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) ALL
4、按Esc
5、输入“:wq”(保存文件)
这样就把自己加入了sudo组,可以使用sudo命令了。
如图:

xxx is not in sudoers file 解决(转)的更多相关文章
- Linux sudo 错误:XXX is not in the sudoers file 解决办法
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...
- 【linux】xx is not in the sudoers file 解决办法
原帖地址:http://blog.sina.com.cn/s/blog_4ef045ab0100j59t.html 我用的是redhat5.4,在一般用户下执行sudo命令提示llhtiger is ...
- Linux下is not in the sudoers file解决方法
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...
- 关于Ubuntu下is not in the sudoers file解决方法
当我在postgres用户下去执行sudo vim demo.sql需要用管理员权限运行时,并且输入本用户的密码,但是输入之后提示如下: postgers is not in the sudoers ...
- Linux中“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser ...
- [转]Linux下is not in the sudoers file解决方法
来源: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html 当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx ...
- is not in the sudoers file解决方法
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权 ...
- [RedHat]“is not in the sudoers file”解决方法
当在终端执行sudo命令时,系统提示“luckchengis not in the sudoers file”: $ sudo ls Password: luckcheng is not in the ...
- 用户不在sudoers文件中怎么办,ziheng is not in the sudoers file解决方法
sudo是linux系统中,用来执行需要权限命令,但是一些朋友使用sudo时,出现下面的错误“ziheng is not in the sudoers file. This incident will ...
随机推荐
- centos7.5 python修复
参考文章地址: 1.CentOS7修复python拯救yum: http://blog.51cto.com/welcomeweb/2132654 所有rpm包下载完成 wget http://mirr ...
- Java Calendar使用总结
JavaCalendar 类时间操作,这也许是创建和管理日历最简单的一个方案,示范代码很简单. 演示了获取时间,日期时间的累加和累减,以及比较. 原文地址:blog.csdn.NET/joyous/a ...
- Hibernate or 的用法
转自baidu estrictions.or(Restrictions.like(),Restrictions.or(Restrictions.like,........))里面的or可以无限加的.还 ...
- xss漏洞利用
简述 跨站脚本攻击(也称为XSS)指利用网站漏洞从用户那里恶意盗取信息.攻击者通过在链接中插入恶意代码,就能够盗取用户信息.攻击者通常会在有漏洞的程序中插入 JavaScript.VBScript. ...
- asp.net mvc简单分页实例
@{ ViewBag.Title = "Index"; } @{ int pageIndex = (int)ViewBag.CurrentPage; int pageCount = ...
- linux 网络之 bond 网卡模式
Linux bond模式通过多个网卡绑定技术既能增加服务器的可靠性,又增加了可用网络宽带,为用户提供不间断的网络服务: 七种bond模式: 第一种模式:mod=0 ,即:(balance-rr) Ro ...
- 关于JS事件冒泡与JS事件代理(事件委托)
连接:https://blog.csdn.net/supercoooooder/article/details/52190100 核心代码: <ul id="parentUl" ...
- HNOI2018游记
第一次参加本省省选,结果又是一次划水 Day 0 喝了一个小时鸡汤 大家看看人家钱学森(sheng) 竞赛生要多发展些爱好 不要一考完就fake,那种下考说"大佬AC辣!太强啦!月莫月莫月莫 ...
- luogu P3978 [TJOI2015]概率论
看着就是要打表找规律 使用以下代码 for(int i=3;i<=20;i++) { int a1=0,a2=0; for(int j=1;j<i;j++) { for(int k=0;k ...
- 代码控制打电话、发短信、发邮件、打开手机app等操作
很多时候我们需要利用我门自己的app进行一些打电话.发短信等的操作,那么如何利用代码实现呢,下面就介绍一些简单的方法来实现这些操作. 一.打电话: <1>最简单.最直接的方法----直接跳 ...