I'm running Linux Mint 17.3.
By default, running shutdown or other commands like reboot, poweroff requires root privilege.
So I added the following line
lesaff_b ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown
to /etc/sudoers. I know it still requires that I run these commands as sudo but it won't ask for password, so I create an alias for each of them.
It worked fine the first time, but then it stopped working, I now need to run these commands as sudo and type my password. I know there are others ways of running these commands without sudo, but why doesn't it work whereas it should, and most importantly, why did it work one time ??