报错信息: work is not in the sudoers file. This incident will be reported.
1、切换root账户
2、添加sudoers文件写权限(因为其默认是只读权限)
chmod u+w /etc/sudoers
3、vi /etc/sudoers // 打开文件
找到root ALL=(ALL) ALL 这一行,在其下面追加:
xxxx ALL=(ALL) ALL xxxx即是你的用户名
保存并退出
4、 撤销sudoers文件权限
chmod u-w /etc/sudoers