Thursday, August 6, 2009

passwordless shutdown of ubuntu

the correct way to edit the /etc/sudoers file is via "sudo visudo". using "chmod u+w /etc/sudoers" is a no-no

if you brick it then restart the computer with physical access and enter recovery mode and drop to the root prompt and fix the file.. reinstall is not required

to get a password less shutdown go;
sudo visudo 

add the line and save to its default location
%admin ALL=NOPASSWD: /sbin/shutdown

sudo chmod +s /sbin/reboot

No comments:

Post a Comment