Originally Posted by JZL240I-U
The OP has Ubuntu as his system. As I understand it, Ubuntu sudo asks for the user's password?!?
Just a clarification.
sudo shutdown -P now
works fine on Ubuntu. Also sudo does ask for the current user's password but if you are doing lots of sudo's, and aren't overly worried about security, you can avoid that by adding in the /etc/sudoers file (using visudo)
username ALL=NOPASSWD: ALL
where "username" is your normal username (if desired replace the second ALL with specific applications, eg /sbin/shutdown).
In any case this is not the best way to shutdown if you are using a desktop. It should work naturally from the GUI.