I cannot get the shutdown and reboot options

Mark Grieveson dg135 at torfree.net
Fri Nov 24 08:32:10 CET 2006


> Yes, thanks. Your wording is similar to that in the forum message. 
> I've altered the sudoers file to read as follows: %terry ALL=(root) 
> NOPASSWD:/usr/lib/xfsm-shutdown-helper The only other uncommented line 
> is: root ALL=(ALL) ALL I'm not sure how relevant the sudoers file is 
> on my system. PCLinuxOS basically uses root rather than sudo. 

"sudo" is a package that is intended to "provide limited super user 
privileges to specific users."  The ability to reboot and/or shutdown in 
xfce4 requires super user powers; so, if you want your regular user to 
be able to reboot, you need to set up sudo to do this.  So, install the 
package sudo from synaptic, and attempt to edit your sudoers file.

> I just tried running the command with the following result: 
> [terry at localhost ~]$ /usr/lib/xfsm-shutdown-helper XFSM_SUDO_DONE 
> [hangs so I press ENTER again, then:] FAILED Oh, the pain. I get the 
> same result after changing sudoers to %terry 
> ALL=NOPASSWD:/usr/lib/xfsm-shutdown-helper and: %users 
> ALL=NOPASSWD:/usr/lib/xfsm-shutdown-helper There is no "user alias 
> specification" in sudoers. The man page is so much geekese, so I'm not 
> even sure I need one, let alone understand how to format it.

The man pages are painful, no doubt about it.  When I first struggled 
with this, I thought, "Good Lord, can't anyone write a simple faq?"  
When I found a faq on this subject, it basically said, "read the man page".

I did find a couple of sites that were helpful, though:
http://wiki.archlinux.org/index.php/Allow_users_to_shutdown
http://forum.xfce.org/index.php?topic=2890.msg12174

In Debian, the "xfsm-shutdown-helper" file is locate at 
/usr/sbin/xfsm-shutdown-helper.  To find out where it's located on your 
system, run the updatedb command (as root), and then "locate 
xfsm-shutdown-helper".  I'm guessing your xfsm-shutdown-helper file is 
located at /opt/xfce4/libexec/xfsm-shutdown-helper.

Find below a description of what I did to enable regular users to 
shutdown and/or reboot:

First, in a terminal, as root, enter "visudo -f /etc/sudoers"

This will allow you to edit the sudoers file.  By doing this, you will 
be giving everyone, and not just root, the power to either reboot or 
shutdown the computer.

In Debian systems, add:

%users ALL=NOPASSWD:/usr/sbin/xfsm-shutdown-helper

in mine, I have:

mark ALL=NOPASSWD:/usr/sbin/xfsm-shutdown-helper

I'm the only user; so, I just set it up for user "mark" (note, there's 
no percent sign).


For other systems, I think the command to add to the sudoers file is:

%users hostname=NOPASSWD:/opt/xfce4/libexec/xfsm-shutdown-helper

or, it may be:

user ALL=(root) NOPASSWD:/opt/xfce4/libexec/xfsm-shutdown-helper

or, perhaps,

terry ALL=NOPASSWD:/opt/xfce4/libexec/xfsm-shutdown-helper
(the above being specifically for user terry)

I got these from googling.  After hacking around, I finally did find one 
line that worked on my system (see above); so, I'm sure you'll likewise 
find one.


Mark



More information about the Xfce mailing list