Skip to main content

Posts

Showing posts from April, 2020

Manage Advance Permission

1. SUID A user would write to the /etc/shadow file to change password, but he doesn't have root permission to do it. [root@hnl ~]# ls -l /etc/shadow ----------. 1 root root 1184 Apr 30 16:54 /etc/shadow SUID solves the problem by giving temporary root permission to the user. [root@hnl ~]# ls -l /usr/bin/passwd -rwsr-xr-x. 1 root root 32680 Jan 28 2010 /usr/bin/passwd      ---> use s to replace user execute permissions 2. SGID Both Linda and Lori work at the accounting group. When Linda creates a file, the file's group ownership is her primary group: Linda. Lori cannot access this file. SGID is used to make the directory tree (i.e. files and subdirectories)shared among the accounting group. Both users have accounting as their secondary group. Linda's file is shared with Lori with the help of SGID. [root@hnl data]# ls -ld account drwxr-sr-x. 2 root account 4096 Apr 30 21:28 account       ---> use s to replace gro...