Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SUID
Edit
PageHistory
Diff
Info
LikePages
A [SUID] program (short for Set [UID]) is when a program has the <tt>u+s</tt> permission bit set. This means that the program runs with the Effective UID (EUID|UID] of the person that owns the file, not the person that runs the program. For instance, a SUID program owned by <tt>root</tt> would run as <tt>root</tt>, instead of a normal user when executed. To run a progam completely as a new user, it needs to be SUID to that user, and you need to execute <verbatim> setregid( getegid(), getegid() ); setreuid( geteuid(), getegid() ); </verbatim> Many progams need this, as they will drop any [EUID|UID] permissions on startup. You can do so using: <verbatim> setregid( getgid(), getgid() ); setreuid( getuid(), getuid() ); </verbatim>
3 pages link to
SUID
:
EffectiveID
UID
KnowYourSysadmin