Centos和RedHat系统只普通用户默认是没有sudo权限的,经常会出现
master is not in the sudoers file. This incident will be reported.其中master是用户名。
使得普通用户具有sudo权限的办法
1.切换到root用户
2.添加对 /etc/sudoers文件的写权限。
chmod u+w /etc/sudoers3.向/etc/sudoers添加普通用户(如master)的权限。
找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名)。
master ALL=(ALL) ALL
本文介绍如何为Centos和RedHat系统的普通用户添加sudo权限,包括切换到root用户、修改/etc/sudoers文件的写权限及添加普通用户的sudo权限等步骤。
777

被折叠的 条评论
为什么被折叠?



