Linux下is not in the sudoers file解决方法
来源:互联网 发布:lol域名为何火 编辑:程序博客网 时间:2024/05/16 06:10
解决方案:
首需要切换到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”(退出)
首需要切换到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命令了。
转自:http://blog.csdn.net/zhuqinglu/article/details/2050927
0 0
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux中“is not in the sudoers file”解决方法
- Linux中“is not in the sudoers file”解决方法
- Linux中“is not in the sudoers file”解决方法
- Linux中“xxx is not in the sudoers file”解决方法
- Linux中“is not in the sudoers file”解决方法
- is not in the sudoers file解决方法
- is not in the sudoers file解决方法
- is not in the sudoers file解决方法
- linux下遇到xxx is not in the sudoers file
- Oracle学习之:详解ADDM工具
- Android应用防止被杀的方法
- Array小结
- java synchronized:(实例方法同步、静态方法同步)区别
- 5-对象+函数+数组note+数组详细
- Linux下is not in the sudoers file解决方法
- 集合框架_集合的特点和数据结构、如何选择使用哪种集合呢、各种集合常见功能和遍历方式总结
- 微信小程序免费HTTPS证书申请搭建教程(2)---安装SSL并使用HTTPS访问
- Trie树实现词频统计与查找
- Android性能优化(一)--基本概念
- 单利模式的使用
- 近期将要学习的内容(flag)
- lambda--list集合遍历
- ASP.NET Core 1.0 静态文件、路由、自定义中间件、身份验证简介