When a program has the suid bit set, any user who runs it is able to run it
with the privileges of its owner, not the user actually running it. This
feature is most useful (and most dangerous) when the program is owned by
root. It allows ordinary users to access parts of the system that can
normally be accessed only by the superuser. 

Probably the most common use everyday users encounter is the program
/bin/passwd, which allows an ordinary user to change his or her password;
this requires writing to the /etc/passwd (or /etc/shadow) file, something
that normally only root can do. 

The suid bit is a bit in a permissions field, like the ones in the
owner/group/everybody fields you see used with chmod. To find programs with
the suid bit set, do an "ls -l" and look for an s instead of an x in the
leftmost permissions set.

You can set the suid bit with the command "chmod +s filename" or by
specifying the permissions value as 4 (octal) characters instead of the more
familiar 3. "man chmod" for more detail.

At 02:46 PM 10/17/99 -0400, John P. Marr wrote:
>I've heard a lot about SUID, and I was wondering if someone could please 
>explain to me exactly how to do this.  I found some info on the net about 
>what it is, but I would just like a clearer explanation of HOW to do it.
>
>Thanks
> John
>
>
>
------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
Palo Alto, CA                                    [EMAIL PROTECTED]        
----------------------------------------------------------------

Reply via email to