You could write a script like this. Call it shutdownnow.
Code:
#!/bin/sh
sudo /sbin/shutdown -h now
Paste the script to the desktop and change icon if wish.
There are several ways to let users use shutdown command.
* One is let anyone use the shutdown command by changing permissions if not wanting to go through this process.
* Add access to /etc/sudoers file.
* One way is to add shutdown to your /etc/sudeors file. I will give an example that requires no paasword to issue the command. If you never edit the sudeors file it requires you to use visudo to edit it. It requires root access to do. Also it uses vi as the default editor. Nice but very confusing to the beginner. I perfer using nedit for it.
To change to nedit issue command export VISUAL="nedit"
To edit visudoers file issue command visudo
Example of /etc/sudoers file.
Code:
# sudoers file.
#
username ALL=NOPASSWD: /etc/shutdown
Brian1
" Google the Linux way @
http://www.google.com/linux "