Here “ s” is nothing but SUID which is applied to Owner. we can use ls -l command to check the ~]# which ping # Checking the Path of the ~]# ls -l /bin/ping # Checking the Permission of the FileĪs per Sample output above Owner of ping binary is root (Highlighted in Red Color) and belongs to group root (Highlighted in Skyblue Color) and has -rw sr-xr-x permission. The reason behind that is SUID special permission is applied to ping binary file.
Rtt min/avg/max/mdev = 0.027/0.037/0.042/0.007 msĪs we can see on above sample output we able to use ping command in normal user. ~]$ whoami # To check currently Logged in ~]$ ping -c 3 localhost user1 and try to use ping command to check the connectivity. SUID alphabetically identified by letter “ s” and Numerically Identified by “ 4“. Let’s take an example to understand the concept properly. user1 still it will run as root user only. Means if i run the ping command by logging in with a normal user i.e. We are applying SUID to any binary file or script means we are allowing that binary file to execute in any logged in user as a owner of that file.
First of all SUID should be applied to a binary file or to a script and we can apply SUID from root user only using chmod command. Now let’s Understand what is the use of SUID. Normal user can use ping command to check network connectivity. etc/passwd and /etc/shadow which is only can be done by root user.
We know that root is the Super User in Linux and have all the rights to do administrative tasks but have you noticed that normal user also can do some administrative tasks such as reset the Password and as we know that by reseting the password two files getting updated i.e. Download Free Linux eBook HERE! "Learn Linux in 5 Days" - A Free Linux eBooks for Beginners SUID (Super User ID)