创建用户

  1. adduser newuser

The **adduser** command creates a new user, plus a group and home directory for that user.

添加进入sudo组

  1. usermod -aG sudo newuser

The **-aG** option tells the system to append the user to the specified group. (The -a option is only used with G.)
或者

  1. gpasswd -a user group

删除sudo

  1. gpasswd -d user group

列出用户所属的组

  1. groups newuser

删除用户及其目录

  1. userdel -r username