vboxuser is not in the sudoers file. This incident will be reported.

问题分析:
vboxuser【此为你的Ubuntu用户名】没有被识别为可执行sudo命令的对象。

执行以下命令

su
chmod 777 /etc/sudoers
vim /etc/sudoers

在root ALL(ALL:ALL) ALL的下面插入以下脚本

vboxuser ALL(ALL:ALL) ALL

退出修改回440权限【重要,否则无法生效】

chmod 440 /etc/sudoers

推出su模式后生效

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 当在终端输入大多数指令时,如果出现"vboxuser is not in the sudoers file"的报错,这是因为Ubuntu用户没有被添加到sudo中。解决这个问题的方法如下:首先,关机并切换到之前的用户登录,然后切换到root权限,可以使用命令"sudo -s"。接下来,为sudoers文件添加权限,可以使用命令"chmod u+x /etc/sudoers"。然后,编辑sudoers文件,为新用户提升权限,可以使用命令"gedit /etc/sudoers"。在"root ALL=(ALL:ALL) ALL"下添加"user ALL=(ALL:ALL) ALL",保存退出。最后,关机并切换到新的用户,此时新用户就可以切换到root权限了。\[1\]\[2\] #### 引用[.reference_title] - *1* [ubuntu用户出现vboxuser is not in the sudoers file报错时解决办法](https://blog.csdn.net/g65775005/article/details/128754296)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [user is not in the sudoers file.This incident will be reported](https://blog.csdn.net/weixin_45208598/article/details/105787191)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Linux||报错:vboxuser is not in the sudoers file. This incident will be reported.](https://blog.csdn.net/Inochigohan/article/details/128206433)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值