Situation description: After
I ffcs
log in to the system with an account, I sudo -i
need to enter a password, and some do not need to enter a password.
However, after checking /etc/sudoers
, I found that the ffcs account configured in it is nopass
correct.
Troubleshooting process:
1. visudo
Check the configuration, NOPASSWD
2. Check the user group situation . Compared with the user group configured
id ffcs
for the same ffcs
account , it is found that there is an additional user groupNOPASSWD
wheel
3. Check visudo
the configuration again, and check wheel
the configuration of the user group
. It is found that wheel
the user group needs to enter a password. 并且,ffcs的配置在wheel用户组的配置上面 所以,底下wheel的生效。
So, when this ffcs
is used sudo -i
, a password is required.
Solution:
Delete the user group ffcs
in wheel
, so that sudo -i
no password is required.
gpasswd -d ffcs wheel