平臺: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! 命令