visudo &

Add the bold lines
Defaults        env_reset

Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot, /sbin/poweroff

root    ALL=(ALL) ALL

user_name   ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS


https://help.ubuntu.com/community/Sudoers
posted by citadel
To remove the following message when you execute xterm,

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.


$ sudo passwd root

or

$ cd $HOME && touch .sudo_as_admin_successful





posted by citadel