January 2018
Intermediate to advanced
376 pages
8h 45m
English
When a regular file has its SUID permission set, whoever accesses the file will have the same privileges as the user of the file. When the SGID permission is set on a regular file, whoever accesses the file will have the same privileges as the group that's associated with the file. This is especially useful on program files.
To demo this, let's say that Maggie, a regular, unprivileged user, wants to change her own password. Since it's her own password, she would just use the one-word command, passwd, without using sudo:
[maggie@localhost ~]$ passwdChanging password for user maggie.Changing password for maggie.(current) UNIX password:New password:Retype new password:passwd: all authentication tokens updated ...