Do we need to reboot after adding a user to sudoers?
Do we need to reboot after adding a user to /etc/sudoers
?
Solution 1:
No. It'll work with the next sudo
command.
But if it does not work, you can avoid rebooting by running
sudo service sudo restart
Solution 2:
I just did this and yes, I did in fact have to reboot. So, maybe the previous answer wasn't wrong, but it definitely isn't right 100% of the time. Writing this in case someone else is looking for the answer as I just was.
Solution 3:
In CentOS 7 you can also Logout from the system with "exit" and Login again and the Sudoers will be updated.
I've tested on minimal installation but I believe it works in other targets and possibly other distributions aswell.