RH033 Unit15 Advanced Topics in Users, Groups and Permissions

Objectives
Upon completion of this unit, you should be abe to:
  • Describe where Linux stores user, group and password information
  • Change identities
  • Set default permissions
  • Use special permissions
User and Group ID Numbers
1) Users names map to user ID numbers
2) Group names map to group ID numbers
3) Data stored on the hard disk is stored numerically
/etc/passwd, /etc/passwd and /etc/group files
1) Authentication informaiton is stored in plain text files
  • /etc/passwd
  • /etc/shadow
  • /etc/group
  • /etc/gshadow
User management tools
1) Graphical tools: system-config-users
2) Command-line
  • useradd
  • usermod
  • userdel [-r]
System Users and Groups
1) Server programs such as web or print servers typically run as unprivileged users, not as root
  • Examples: daemon, mail, lp, nobody
2) Running program in this way limits the amount of damage any single program can do to the system
Monitoring Logins
1) Connected users: w
2) Recent Logins: last, lastb
Default Permissions
1) Default permission for directories is 777 minus umask
2) Default permssion for files is the directory default without execute permission
3) umask is set with the umask command
4) Non-privileged users’ umask is 002
  • Files will have permissions of 664
  • Directory will have permission of 775
5) root’s umask is 022
Special Permissions for Executables
1) Special permissions for executables (4 for suid, 2 for sgid, 1 for the sticky bit)
  • suid: comand run with permissions of the owner of the command, not executor of the command
  • sgid: command run with group affiliation of the group of the command
Special Permissions for Directories
1) Special permissions for directories:
  • sticky bit: files in directories with the sticky bit set can only be removed by the owner and root, regardless of the write permission of the directory
  • sgid: files created in directories with the sgid bit set have group affiliations of the directory
End of Unit15
1) Questions and Answers
2) Summary
  • User information is stored in /etc/passwd
  • Group information is stored in /etc/group
  • Special Permission: Sticky Bit, SetUID, SetGUI

你可能感兴趣的:(Advanced,permissions,users,groups,Topics)