is not in the sudoers file. This incident will be reported(linux 用户没有sudo权限)

linux 用户没有sudo权限

 

1. 切换root用户

su root

2. 给/etc/sudoers添加写的权限

   chmod u+w /etc/sudoers

3.添加用户添加sudo权限

  
a.            vi    /etc/sudoers

 

b. 在root       ALL=(ALL)                ALL这句下面添加hunter      ALL=(ALL)                ALL。如下图所示

3. 去掉/etc/sudoers的写权限。

   chmod u-w /etc/sudoers

is not in the sudoers file. This incident will be reported(linux 用户没有sudo权限)