1

Fedora 20, clean install. I added the following lines to my sudoers file with visudo:

%power ALL=NOPASSWD: /sbin/shutdown

I then created group "power" and added my account to this group. Rebooted, confirmed that I was in the group with the "groups" command.

However, when I type "sudo shutdown" I am still prompted for a password.


Update:

I previously had my permissions group %power located in the sudoers file below root:

root ALL=(ALL) ALL

but above %wheel:

%wheel ALL=(ALL) ALL

It works now if I move it to below %wheel. Why is this?

1 Answer 1

2

sudo processes the lines in order.

The ALL in the %wheel line applies to sudo /sbin/shutdown, and isn't tagged with NOPASSWD. Any user who is in both the wheel and power group would have to enter their password when running sudo /sbin/shutdown; users just in the power group would not.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .