Linux - Lab 9: SUID, SGID, SUDO
SUID, SGID, SUDO
In Lab 9: SUID, SGID, SUDO, participants typically delve into the advanced aspects of Linux security related to SUID (Set User ID), SGID (Set Group ID), and sudo (superuser do) privileges. This lab involves understanding and applying the SUID and SGID permissions to execute files with the privileges of the file owner or group owner, respectively. Participants may explore the chmod command to set these permissions and the sudo command to perform administrative tasks. The lab aims to provide hands-on experience in configuring elevated privileges for specific users or groups, enhancing security while allowing for specific controlled actions. Successful completion of Lab 9 equips participants with advanced Linux security skills, enabling them to implement fine-grained control over user privileges and secure system administration practices.
Lab:
#Apply SUID to a directory
chmod u+s /data
#Remove SUID from a directory
chmod u-s /data
#Apply SGID to a directory
chmod g+s /data
#Remove SGID from a directory
chmod g-s /data
#Using visudo to assign limited escalated privileges to a user
visudo
User\_Alias ABC=harry,gourav,manali
Cmnd\_Alias TEST=/usr/sbin/useradd, /usr/sbin/userdel
ABC TEST=ALL