1. adduser username
2. usermod -aG sudo username
中间出现的以下内容,全部为空略过即可:
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n]
3. 退出ssh,重新用新user登录
参考:
https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart