young is not in the sudoers file. This incident will be reported.
时间: 2023-11-16 11:52:41 浏览: 181
当Linux中的普通用户在使用sudo执行命令时,如果报错"xxx is not in the sudoers file. This incident will be reported.",这表示该用户在sudoers文件中没有权限。要解决这个问题,需要编辑/etc/sudoers文件,并给该用户添加权限。
你可以通过以下步骤解决该问题:
1. 打开终端并使用root用户身份登录。
2. 执行命令:vi /etc/sudoers,以编辑sudoers文件。
3. 在文件中找到 "root ALL=(ALL) ALL" 这一行,并在其下面添加 "xxx ALL=(ALL) ALL"(这里的xxx是你的用户名)。
4. 保存并退出编辑器。
5. 现在该用户应该具有sudo权限了。
请注意,编辑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 权限。
阅读全文
相关推荐















