RH033 13. ADVANCED USER ADMINISTRATION

 MONITORING LOGINS

last|less --->Shows all correct login
last -b|less --->Shows all wrong login
who --->Shows users logged in in all terminals
whoami --->Name of user whose logged in
w --->Shows remote login if any


Original values for file was 666 and dir was 777 before umask came into  existence so all used to get full permission for file/dir so to avoid

ROOT FILE DIR

Originalvalue 666 777 //So now if root creates it gets
umask--value 022 022 // 644 for files and 744 for dir.
Default--value 644 744


NormalUser FILE DIR

Originalvalue 666 777 //So now if normal user creates it gets
umask--value 002 002 // 664 for files and 774 for dir.
Default--value 664 774

Umask -> Responsible for setting default permissions to files/dir we create


umask of root is 0022
umask of normal user is 0002


SUID and SGID and STICKYBIT

1.SUID ->set userid (4)
suid is special permission(4) set along with existing permissions, which allows normal user to execute command with privilege of root.

ex:- chmod 4770 /bin/cat

2.GUID ->set groupid (2)

guid is special permission(2) in set to dir by which files created under dir gets same owner of that of dir

ex:- chmod 2770 dir1

3.STICKYBIT ->STICKYBIT (1)

stickybit is special permission(1) which stops non-owner of file from deleting the file from a dir for which stickybit is set.

ex:- chmod 1770 /var

If you found this post useful, I would really love it, if you can Like the Page, or share it with your Facebook/Google+/Twitter Friends... It will keep me motivated. Thank you!

No comments:

Post a Comment