linux创建非管理员账号方法

1.添加用户到 'sudo' group

1.1 ubuntu

          sudo adduser newuser

          sudo usermod -aG sudo newuser

1.2 redhat

      sudo adduser newuser

  sudo passwd newuser

  sudo usermod -aG wheel newuser

2.编辑文件 /etc/sudoers using visudo.

 2.1 ubuntu

   

Modify '/etc/sudoers' with the editor "visudo".
 
#Create a user called "newuser"
[root@mylinux~]#useradd newuser
[root@mylinux~]#passwd newuser
 
#Edit the file with visudo:
[root@mylinux~]# visudo
 
#Find a line 'User privilege specification' and add the following.
newuser ALL=(ALL) ALL

你可能感兴趣的:(linux,运维,服务器,ubuntu)