为什么 CentOS 需要 root 权限来配置首选项面板?看来 sudoer 访问确实应该足够了。有可能改变这一点吗?
答案1
绕过这个问题的快速方法是(假设有适当的sudoers
权限)在适当的命令前面加上 前缀sudo
,例如
sudo system-config-users
否则,进行一些挖掘:
% ls -l =system-config-users
lrwxrwxrwx 1 root root 13 Jul 24 2015 /usr/bin/system-config-users -> consolehelper
经过更多的挖掘,发现了一个userhelper
程序,其手册包含以下花絮:
UGROUPS
A comma-separated list of groups whose members will be authenti-
cated as if USER were set to the special value <user>. If the
invoking user is not a member of one of these groups, the name
defined in USER will be used as normal.
Centos 7 似乎wheel
默认设置组:
# cat /etc/security/console.apps/config-util
USER=root
UGROUPS=wheel
#
因此理论上,如果您的用户在该wheel
组中,这些密码提示应该要求您输入密码。您的用户在该wheel
组中吗?