is not in the sudoers file 问题解决【转载】

解决方案:
首需要切换到root身份
$su -
(注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样)

然后
$visudo     //切记,此处没有vi和sudo之间没有空格

1、移动光标,到最后一行
2、按a,进入append模式
3、输入
your_user_name ALL=(ALL)  ALL
4、按Esc
5、输入“:w”(保存文件)
6、输入“:q”(退出)

这样就把自己加入了sudo组,可以使用sudo命令了。

redhat5.4,在一般用户下执行sudo命令提示llhtiger is not in the sudoers file. This incident will be reported.解决方法:

一、$whereis sudoers -------找出文件所在的位置,默认都是/etc/sudoers         
二、 #chmod u+w /etc/sudoers    以超级用户登录su -root ,修改文件权限即添加文件拥有这的写权限 限,ls -al /etc/sudoers 可以查看原文件的权限。    
三、vim /etc/sudoers 编辑文件,在root ALL=(ALL)ALL行下添加XXX ALL=(ALL)ALL,XXX为你的用户名。添加方法:找到root行,按下”i“键进入编辑模式添加即可!编辑好后esc键进入一般模式,“:wq"保存退出!
最后, #chmod u-w /etc/sudoers 回到文件的原权限!

时间: 2024-07-29 10:23:39

is not in the sudoers file 问题解决【转载】的相关文章

Ubuntu下is not in the sudoers file 问题解决

在Ubuntu12.04 下,使用sudo apt-get install XXX 时,突然跳出 username is not in the sudoers file的问题 然后我一查此username的类型,果然是标准用户而不是管理员用户 解决这个问题至少有两种方法: 一.System Settings ->User Accounts -> 点击Unlock ->输入root密码 -> 修改AccountType(用户类型)为Administrator(管理员) -> 重

ubuntu:xxx is not in the sudoers file. 问题解决

ubuntu 下普通用户用 sudo 执行命令时报 "xxx is not in the sudoers file.This incident will be reported" 错误,解决方法是在 /etc/sudoers 文件里给该用户添加权限.操作过程如下: 1. 切换到 root 用户下 2. /etc/sudoers 文件默认是只读的,对 root 来说也是,因此需先添加 sudoers 文件的写权限,命令是: chmod u+w /etc/sudoers 3. 编辑 sud

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

解决方法如下: 1>.进入超级用户模式.也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式. 2>.添加文件的写权限.也就是输入命令"chmod u+w /etc/sudoers". 3>.编辑/etc/sudoers文件.也就是输入命令"vim /etc/sudoers",输入"i"进入编辑模式,找到这一行:"root ALL=(ALL) ALL"在起下面

sunzl is not in the sudoers file.This incident will be reported

Description: [[email protected] nuc900bsp$] ./install.sh sorry!you are not the root !! [[email protected] nuc900bsp$] sudo ./install.sh password: sunzl is not in the sudoers file.This incident will be reported fixed: [[email protected] nuc900bsp$] su

xxx is not in the sudoers file. This incident will be reported

问题描述: 新建用户执行命令sudo chmod 700 ,提示输入root命令. 输入三次错误. 提示 yourid is not in the sudoers file. This incident will be reported 问题解决 more /etc/sudoers 增加用户 root    ALL=(ALL)     ALL liuyuxing  ALL=(ALL)    ALL 这样你的用户就可以使用所有的命令了,但是每次使用之前要输入自己的密码. **** 区别 sudo

centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法

1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 #passwd tommy   //修改密码 Changing password for user tommy. New UNIX password:     //在这里输入新密码 Retype new UNIX password:  //再次输入新密码 passwd: all authentication tokens updated successfully.

xxx is not in sudoers file 解决(转)

解决方案:首需要切换到root身份$su -(注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样) 然后$visudo     //切记,此处没有vi和sudo之间没有空格 1.移动光标,到最后一行2.按a,进入append模式3.输入your_user_name ALL=(ALL)  ALL4.按Esc5.输入“:wq”(

is not in the sudoers file解决方法

用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了. 下面是修改方法:1)进入超级用户模式.也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式.(当然,你也可以直接用root用) 2)添加文件的写权限.也就是输入命令"chmod u

普通用户执行sudo报hadoop is not in the sudoers file

今天在用普通用户执行sudo命令时报错如下: hadoop is not in the sudoers file. This incident will be reported. 实测解决方式如下: 1,root用户登录. 2,进入到/etc目录. 3,执行chmod u+w /etc/sudoers给sudoers文件增加write权限. 4,执行vim sudoers 找到root ALL=(ALL) ALL这一行,一下面增加hadoopALL=(ALL) ALL(注:hadoop为普通用户