平台:Ubuntu 16.04 vim
命令: adduser code
在root 用户下 执行命令orm
#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! 命令