使用sudo时user is not in sudoers file的解决
来源:互联网 发布:win7仿mac任务栏 编辑:程序博客网 时间:2024/06/18 04:45
在Ubuntu下安装系统以后第一个创建的用户默认是在sudo用户组的,所以以sudo执行命令没有问题。
如果想让新添加的用户也能拥有使用sudo的权利,我们一般可以使用
adduser username sudo这样的命令将用户添加到sudo组中即可(username为你的用户名)
或者usermode -G username sudo。
在CentOS安装系统以后,默认创建的用户没有使用sudo的权限,会提示user is not in suoders files。
但是CentOS下没有sudo用户组,但是有一个wheel用户组。
解决办法:
首先su到root用户下,然后使用usermode -G username wheel。
(我尝试使用adduser username wheel不成功)
还有一种极端的办法是修改/etc/sudoers文件。
使用visudo命令在root ALL=(ALL)ALL行下添加usernameALL=(ALL)ALL(username为你的用户名)。
其实visudo命令是使用vi编辑/etc/sudoers文件,但是sudoers文件是只读文件,所以我们最好直接使用系统提供的visudo命令,这样可以直接编辑sudoers文件而不用修改文件属性。
0 0
- 使用sudo时user is not in sudoers file 的解决
- 使用sudo时user is not in sudoers file的解决
- Linux 使用sudo时,报错 is not in the sudoers file. This incident will be reported 解决
- user is not in the sudoers file
- user is not in the sudoers file 的解决办法
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- is not in the sudoers file 解决
- is not in the sudoers file 解决
- is not in the sudoers file 解决
- 解决is not in the sudoers file.
- is not in the sudoers file 解决
- is not in the sudoers file 解决
- is not in the sudoers file 解决
- xx is not in the sudoers file 问题的解决
- sudo "……is not in the sudoers file." 怎么办?
- xxx is not in the sudoers file解决方法 SUDO
- sudo问题解决 用户名is not in the sudoers file
- 用Qt实现2D绘图
- LeetCode Isomorphic Strings 哈希
- 前端必读:浏览器内部工作原理
- 开通博客了
- QT下简易画板实现
- 使用sudo时user is not in sudoers file的解决
- 达内学习日志Day28:表的创建
- SLF4J 的几种实际应用模式--之一:SLF4J+Log4J
- tomcat启动startup.bat一闪而过
- dump_stack
- Swap Nodes in Pairs
- 3Sum
- UFT录制
- SLF4J 的几种实际应用模式--之二:SLF4J+Logback