admin管理员组

文章数量:1542927

Linux可以通过useradd在/home下创建一个普通用户:

useradd username 新建一个用户

$ sudo useradd username lee

这个时候如果使用sudo命令就会发现,刚创建的普通用户没有root权限:

{username} is not in the sudoers file. This incident will be reported.

$ sudo usermod -s /bin/bash lee
[sudo] password for lee:
lee is not in the sudoers file.  This incident will be reported.

这个时候只需要root账户使用以下命令即可添加root权限:

# adduser lee sudo

本文标签: 普通用户权限Linuxroot