Help for set user ID.

Help for set user ID.

Post by Liu, Karl Zhe » Sat, 14 Sep 2002 21:49:08



Anybody can give some infor about real user ID, effective user ID, saved user
ID?
And how are they of certain process are changed by use of setuid?
Or some good link or traing material about it.
Thanks,

--
Liu, Karl Zhen
------------------------------------
WISE, Lucent Technologies (QD), R&D
Tel: (Office) +86-532-8702000 x5260

http://gdcsr60.gdc.lucent.com/~wise

 
 
 

Help for set user ID.

Post by dutchsla » Thu, 19 Sep 2002 04:16:47


Hi Karl-

Is your question regarding setuid, or su?

Setuid allows a user to run a binary or script as another user, and
su allows a user to become another user without having to logoff
and re-logon.

Setuid is a file permission, and su is a command.

geremy

--
Posted via http://dbforums.com

 
 
 

Help for set user ID.

Post by Muth » Thu, 19 Sep 2002 13:29:04



> Hi Karl-

> Is your question regarding setuid, or su?

> Setuid allows a user to run a binary or script as another user, and
> su allows a user to become another user without having to logoff
> and re-logon.

> Setuid is a file permission, and su is a command.

> geremy

Hi,

How to use the 'setuid' ?

can you give an example?

Thanks and regards,
Muthu

 
 
 

Help for set user ID.

Post by Dan Logche » Thu, 19 Sep 2002 14:07:39




> > Hi Karl-

> > Is your question regarding setuid, or su?

> > Setuid allows a user to run a binary or script as another user, and
> > su allows a user to become another user without having to logoff
> > and re-logon.

> > Setuid is a file permission, and su is a command.

> > geremy

> Hi,

> How to use the 'setuid' ?

> can you give an example?

Write a script or program that you want to run as, say root, and do

chown root:other "binary"
chmod u+s "binary"

This makes it owned by root, then setuid to owner.  This can be done
for whatever user, but keep in mind if the script or program needs to
open a low number socket it will have to be owned by root.

BTW, doing chmod g+s "binary" makes it setgid.

--
Dan