Understanding Set User ID and Set Group ID Permissions

Two more types of permission are “set user ID,” known as suid, and “set group ID,” or sgid. These settings, when used in a program, enable any user running that program to have program owner or group owner permissions for that program. These settings enable the program to be run effectively by anyone, without requiring that each user’s permissions be altered to include specific permissions for that program.

One commonly used program with suid permissions is the passwd command:

matthew@seymour:~$ ls -l /usr/bin/passwd-rwsr-xr-x 1 root root 42856 2013-01-26 10:09 /usr/bin/passwd

This setting allows normal users to execute the command (as root) to make changes to ...

Get Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.