1.添加用户
adduser 用户名 //添加时会输入密码
2.修改用户的密码
passwd 用户名 //更新密码
3.查看所有用户的方法:
1) /etc/passwd 文件;第一列展示了所有用户,直接cat,
或者: cat /etc/passwd | awk -F ":" '{print $1}' 可以过滤出用户名
4.用户使用sudo时提示用户不在sudoers文件的解决方法:(xxx is not in the sudoers file. This incident will be reported.)
让具有管理员权限的用户编辑/etc/sudoers文件,root/或者其他可以使用sudo命令的用户:
在文件中的root下面一行添加:
mzp ALL=(ALL:ALL) ALL
添加后用户就可以使用sudo命令获取管理员权限了