用户 == 员工
组 == 部门
相关系统文件
cat /etc/passwd
查看用户信息
cat /etc/shadow
用户密码信息
cat /etc/group/
用户组信息
cat /etc/gshadow
加密密码
用户分类
超级用户:root uid=0
系统用户:不需要登录系统 服务于应用程序 维护系统的运行
对用户的操作
1:查看用户信息
id
who am i
2:切换用户
su -
3:退出 用户
exit
4:添加
useradd
5:删除
userdel
6:密码
passwd
7:修改用户
usermod
对组 的操作
1:添加
groupadd
2:修改
groupmod
3:删除
groupdel
4:组管理
-a, --add USER 添加用户
-d, --delete USER 删除用户
-h, --help display this help message and exit
-Q, --root CHROOT_DIR directory to chroot into
-r, --delete-password remove the GROUP's password
-R, --restrict restrict access to GROUP to its members
-M, --members USER,... set the list of members of GROUP
-A, --administrators ADMIN
5:切换组
su -