Open 1c7 opened 9 years ago
有两条命令可以做, 一个是 useradd,一个是 adduser adduser 更好用
useradd is native binary compiled with the system. But, adduser is a perl script which uses useradd binary in back-end.
adduser is more user friendly and interactive than its back-end useradd. There's no difference in features provided. http://askubuntu.com/questions/345974/what-is-the-difference-between-adduser-and-useradd
sudo adduser ftpuser
cut -d: -f1 /etc/passwd
http://askubuntu.com/questions/410244/a-command-to-list-all-users-and-how-to-add-delete-modify-users 我这边运行完之后有超多行,不清楚为什么
passwd 需要root权限
列出所有用户 列出所有用户组 Linux 有 user 和 usergroup
一个 user 可以属于多个 usergroup
https://www.linode.com/docs/tools-reference/linux-users-and-groups
1. 添加用户
有两条命令可以做, 一个是 useradd,一个是 adduser adduser 更好用
更具体的解释:
useradd is native binary compiled with the system. But, adduser is a perl script which uses useradd binary in back-end.
adduser is more user friendly and interactive than its back-end useradd. There's no difference in features provided. http://askubuntu.com/questions/345974/what-is-the-difference-between-adduser-and-useradd
实例:
2. 查看系统当前所有用户
http://askubuntu.com/questions/410244/a-command-to-list-all-users-and-how-to-add-delete-modify-users 我这边运行完之后有超多行,不清楚为什么
查看系统当前有哪些用户登录了
2. 修改密码
passwd 需要root权限
列出所有用户 列出所有用户组 Linux 有 user 和 usergroup
一个 user 可以属于多个 usergroup
https://www.linode.com/docs/tools-reference/linux-users-and-groups