平台:Ubuntu 16.04
命令: adduser
在root 用户下 执行命令
#adduser blog password for xx: Adding user `blog' ... Adding new group `blog' (1001) ... Adding new user `blog' (1001) with group `blog' ... The home directory `/home/blog' already exists. Not copying from `/etc/skel'. Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for blog 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] Y --------------------- 给新用户添加权限 # vim /etc/sudoers 修改文件如下: # User privilege specification root ALL (ALL) ALL blog ALL (ALL) ALL 修改的是 readonly file 所以在保存退出时 使用 wq! 命令原文链接:https://www.f2er.com/ubuntu/350341.html