首页> 开发问题 >服务器问题 服务器问题
Linux中“is not in the sudoers file”解决方法
作者:小萝卜 2019-11-29 【 漏洞BUG 】 浏览 1613
简介当在终端执行sudo命令时,系统提示“hadoop is not in the sudoers file”:其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser):1.切换到超级用户:$ su
当在终端执行sudo命令时,系统提示“hadoop is not in the sudoers file”:
其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser):
1.切换到超级用户:$ su
2.打开/etc/sudoers文件:$vim /etc/sudoers
3.修改文件内容:
找到“root ALL=(ALL) ALL”一行,在下面插入新的一行,内容是“hadoop ALL=(ALL) ALL”,然后在vim键入命令“:wq!”保存并退出。
注:这个文件是只读的,不加“!”保存会失败。
4.退出超级用户:$ exit
很赞哦! (0)
相关文章
- 可以ping通虚拟机但不能telnet 9000端口
- Linux启动提示Kernel panic - not syncing: Attempted to kill init解决办法
- ckfinder报错:从服务器读取XML数据出错
- The program 'yum' is currently not installed. You can install it by typing:
- MySQL报错: SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine解决办法
- yum执行时Another app is currently holding the yum lock; waiting for it to exit... The other application is: yum
- 什么情况:IP address '142.252.250.174' could not be resolved: ??֪?????????????? For more information
- polkit pkexec 本地提权漏洞(CVE-2021-4034)解决办法
- IIS7.0运行PHP报错"php-cgi.exe - FastCGI 进程意外退出"
- 网页提示错误(net::ERR_EMPTY_RESPONSE)