[错误解决]ubuntu 不在 sudoers 文件中。此事将被报告。

跟据报错判断,ubuntu没有sudo权限,经过查询需要将ubuntu账户加入/etc/sudoers中

  1. 先切换到root权限
su
输入密码
  1. 修改/etc/sudoers配置
vim /etc/sudoers
  1. 添加帐号
# User privilege specification
root    ALL=(ALL:ALL) ALL
ubuntu    ALL=(ALL:ALL) ALL

原文地址:https://www.cnblogs.com/everfight/p/not_in_sudoers.html