yjjapp is not in the sudoers file. This incident will be reported.
时间: 2023-12-15 08:31:48 浏览: 34
这个错误提示表明当前用户yjjapp没有sudo权限,因此无法执行sudo命令。解决方法如下:
1. 以root用户身份登录系统,然后执行以下命令将yjjapp用户添加到sudoers文件中:
```shell
su root
visudo
```
在打开的sudoers文件中添加以下内容:
```shell
yjjapp ALL=(ALL) ALL
```
保存并退出文件。
2. 如果无法以root用户身份登录系统,则可以使用另一种方法。执行以下命令将yjjapp用户添加到sudoers文件中:
```shell
su
chmod u+w /etc/sudoers
echo "yjjapp ALL=(ALL) ALL" >> /etc/sudoers
chmod u-w /etc/sudoers
```
这将在sudoers文件的末尾添加一行,允许yjjapp用户执行sudo命令。
请注意,修改sudoers文件时需要非常小心,因为错误的修改可能会导致系统无法正常工作。如果您不确定如何修改sudoers文件,请咨询系统管理员或其他有经验的用户。
相关问题
is not in the sudoers file. This incident will be reported.
"is not in the sudoers file. This incident will be reported." 这是在Linux系统中使用sudo命令时出现的错误提示。这个错误的原因是用户没有被授权执行sudo命令的权限。要解决这个问题,可以按照以下步骤进行操作:
1. 打开终端并以root用户身份登录。
2. 执行visudo命令以编辑sudoers文件:sudo visudo。
3. 在文件中找到以下行:root ALL=(ALL:ALL) ALL。
4. 在该行下方添加一个新行,以允许特定用户执行sudo命令:username ALL=(ALL:ALL) ALL(其中username为要添加的用户名)。
5. 保存并关闭文件。
6. 现在,该用户应该能够正常使用sudo命令了。
is not in the sudoers file. This incident will be reported
这是一个关于 Linux 系统权限的问题,我可以回答。这个错误提示意味着当前用户没有被授权执行 sudo 命令,需要使用 root 用户或者具有 sudo 权限的用户来执行该命令。如果您是系统管理员,可以通过修改 /etc/sudoers 文件来添加用户的 sudo 权限。
阅读全文
相关推荐
















