Here is the XML I have in my 'menu.rc' file:
- Code: Select all
<item label="Restart">
<action name="Execute">
<prompt>Are you sure you want to Restart?</prompt>
<command>sudo shutdown -r now</command>
</action>
</item> <item label="Shutdown">
<action name="Execute">
<prompt>Are you sure you want to Shutdown?</prompt>
<execute>sudo shutdown -h now</execute>
</action>
In place of the command 'sudo shutdown -h now', I have used 'sudo /sbin/shutdown -h now', 'sudo /sbin/halt', 'gksu shutdown -h now', 'x-terminal-emulator -t sudo shutdown -h now', and even 'x-terminal-emulator -t shutdown -h now'. Nothing works.
My visudo file looks like this:
- Code: Select all
# User privilege specification
root ALL=(ALL:ALL) ALL
%shutdown ALL=(root)NOPASSWD: /sbin/reboot
%shutdown ALL=(root)NOPASSWD: /sbin/halt
%shutdown ALL=(root)NOPASSWD: /sbin/shutdown
%admin ALL=(ALL)ALL
%admin ALL=NOPASSWD: /sbin/reboot, /sbin/halt, /sbin/shutdown
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
Any help would be appreciated.
Thanks,
Chris Adams.