最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reported. 百度了下,究其原因是用户没有加入到sudo的配置文件里. 解决方法如下: 1.切换到root用户,运行visudo命令 2.找到root ALL=(ALL) ALL,在下面添加一行 xxx ALL=(ALL) ALL 其中xxx是要加入的用户名称…
来源: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html 当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx is not in the sudoers file. This incident will be reported,xxx是你当前的用户名,究其原因是用户没有加入到sudo的配置文件里 工具/原料 vi/vim 方法/步骤 1 切换到root用户,运行visudo命令 2 在打开的配置文…
当我在postgres用户下去执行sudo vim demo.sql需要用管理员权限运行时,并且输入本用户的密码,但是输入之后提示如下: postgers is not in the sudoers file. This incident will be reported 翻译一下:postgres 不在sudoers文件中.将报告此事件. 这时候我们可以根据提示去找到这个 sudoers file .也就是就是在/etc/sudoers文件里给该用户添加权限. 解决方法如下: 1.切换到roo…
当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser): 1.切换到超级用户:$ su 2.打开/etc/sudoers文件:$vim /etc/sudoers 3.修改文件内容: 找到"root ALL=(ALL) ALL"一行,在下面插入新的一行,内容是"hadoop ALL=(ALL) AL…
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了. 1)进入超级用户模式.也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式.(当然,你也可以直接用root用)(注意有- ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有…
Ref:http://blog.sina.com.cn/s/blog_4aa35ca101012qb6.html 装完linux系统,发现普通用户无法使用sudo 命令, 提示:User1(普通用户)is not in the sudoers file, This incident will be reported. 大概意思是说User1这个用户不在sudoers这个文件里,这个事件将要被报告的. 我们可以这样做 [User1@localhost~]$su - (切换到root) 输入超…