centos中普通用户使用sudo报错:centos is not in the sudoers file. This incident will be reported.

centos中普通用户使用sudo报错:centos is not in the sudoers file. This incident will be reported.

su -

chmod u+w /etc/sudoers

vim /etc/sudoers

在 root ALL=(ALL)ALL 这一行下面添加:用户名 ALL=(ALL)ALL

posted @ 2024-04-26 23:37  落落的学习  阅读(38)  评论(0编辑  收藏  举报