Linux配置之解决CentOS中:xx is not in the sudoers file的问题
2018-01-20 16:43
861 查看
刚装完CentOS7,在使用sudo命令安装gcc-c++编译器的时候,出现 Dylan is not in the sudoers file. 的问题,解决办法如下:
1. su - //切换到root权限,横线‘‘-’’的作用是将环境变量也切换到root,如果不加横线“-”,则只切换到root权限,但环境变量还是当前用户的环境变量。
2. 执行visudo命令,代开visudo文件
3.在文件中找到如下两行:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
4. 在这两行后面添加一行,比如你的用户名是Dylan,就这样写:
Dylan ALL=(ALL) ALL
5. ESC键进入命令模式,输入 :wq 保存退出。
1. su - //切换到root权限,横线‘‘-’’的作用是将环境变量也切换到root,如果不加横线“-”,则只切换到root权限,但环境变量还是当前用户的环境变量。
2. 执行visudo命令,代开visudo文件
3.在文件中找到如下两行:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
4. 在这两行后面添加一行,比如你的用户名是Dylan,就这样写:
Dylan ALL=(ALL) ALL
5. ESC键进入命令模式,输入 :wq 保存退出。
相关文章推荐
- Linux配置之解决CentOS中:xx is not in the sudoers file的问题
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决
- centos username is not in the sudoers file 问题解决方法
- Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决
- 解决xx is not in the sudoers file. This incident will be reported.问题
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决【转载】
- 【linux】xx is not in the sudoers file 解决办法
- xx is not in the sudoers file 问题解决【转载】
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决【转载】
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决【转载】
- CentOS下解决”用户账户is not in the sudoers file“问题