fedora22 admin is not in the sudoers file

新安装的fedora22, 将admin设置为了username, sudo切换用户时提示以下错误

[admin@chiplayout ~]$ sudo gedit /etc/test
admin is not in the sudoers file. This incident will be reported.

解决办法: terminal下 su切换到管理员, 输入visudo

[root@chiplayout admin]# visudo

找到下面行

## Allow root to run any commands anywhere
root ALL=(ALL) ALL

后面加上你的用户名

admin ALL=(ALL) ALL

最后 :wq

再打开新的terminal,使用sudo就不会有错啦!

You May Also Like

About the Author: admin

发表评论