天天看点

Ubuntu增加一个用户并给普通用户赋予root权限的方法

http://blog.csdn.net/leo20686802/article/details/6860248

1、添加用户,首先用adduser命令添加一个普通用户,命令如下:

#adduser tommy       

#passwd tommy        

 2、root权限赋予

方法一: 修改 /etc/sudoers 文件,找到下面一行,把前面的注释(#)去掉

## allows people in group wheel to run all commands

%wheel    all=(all)    all

然后修改用户,使其属于root组(wheel),命令如下:

#usermod -g root tommy