Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Setuid
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===SUID=== '''4701''' on an executable file owned by 'root' and the group 'root' A user named 'thompson' attempts to execute the file. The executable permission for all users is set (the '1') so 'thompson' can execute the file. The file owner is 'root' and the SUID permission is set (the '4') - so the file is executed as 'root'. The reason an executable would be run as 'root' is so that it can modify specific files that the user would not normally be allowed to, without giving the user full root access. A default use of this can be seen with the <code>/usr/bin/passwd</code> binary file. <code>/usr/bin/passwd</code> needs to modify <code>/etc/passwd</code> and <code>/etc/shadow</code> which store account information and password hashes for all users, and these can only be modified by the user 'root'.<syntaxhighlight lang="console"> [ thompson ~ ] $ stat -c "%a %U:%G %n" /usr/bin/passwd 4701 root:root /usr/bin/passwd [ thompson ~ ] $ passwd passwd: Changing password for thompson </syntaxhighlight> The owner of the process is not the user running the executable file but the owner of the executable file
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)