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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值