fedora22 admin is not in the sudoers file
生活
0 字 / 约 0 分钟
2015/10/28
环境:全新安装 Fedora 22,安装时将用户名设为 admin。
现象:执行 sudo 时提示
admin is not in the sudoers file. This incident will be reported.解决步骤
切换到 root
bashsu -编辑 sudoers 文件
bashvisudo找到并修改配置
定位到:## Allow root to run any commands anywhere root ALL=(ALL) ALL在其下方 新增一行:
bash## Allow root to run any commands anywhere root ALL=(ALL) ALL admin ALL=(ALL) ALL保存并退出
在 vim 中按Esc,输入:wq回车。验证
打开新的终端,执行:bashsudo gedit /etc/test不再报错即可。
编辑完成后,用户
admin即拥有完整sudo权限。