ubuntu---添加新用户

                        ubuntu---添加新用户

1、添加新用户

andy@andy-virtual-machine:/$ sudo adduser raven

  

Tip:用户名首字符开头必须是小写字母。

2、给新用户添加root权限

新创建的用户没有sudo权限:

raven@andy-virtual-machine:/$ sudo apt-get install tree

[sudo] password for raven: 
raven is not in the sudoers file.  This incident will be reported.

在/etc/sudoers文件下添加权限内容:

# User privilege specification
root    ALL=(ALL:ALL) ALL
raven   ALL=(ALL:ALL) ALL

      

重新运行sudo命令:

猜你喜欢

转载自blog.csdn.net/yanlaifan/article/details/113914945