Gentoo Archives: gentoo-user

From: Michael Kjorling <michael@××××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] System shutdown from within Xfce
Date: Wed, 04 Jan 2006 13:30:54
Message-Id: 43bbccf8.699bc4a7@vuk.kjorling.com
1 I run Xfce 4.2.3.2 and want to be able to shut down my system from
2 within X. At the moment I have to log in as root and then issue a
3 shutdown command, but Xfce is supposed to support doing this through
4 the GUI.
5
6 Looking around turned up the Xfce documentation and specifically
7 <http://www.xfce.org/documentation/docs-4.2/xfce4-session.html#xfsm-shutdown>,
8 which says I need sudo and the right to execute xfsm-shutdown-helper
9 as root. OK, so I emerged app-admin/sudo and added the following line
10 at the end of /etc/sudoers using visudo:
11
12 %wheel vuk=/usr/libexec/xfsm-shutdown-helper NOPASSWD
13
14 (Those are tabs.) My system is named vuk, I am a member of the wheel
15 group, and /etc/hosts says:
16
17 vuk ~ # grep vuk /etc/hosts
18 127.0.0.1 vuk.kjorling.com vuk localhost
19 ::1 ip6-localhost vuk ip6-loopback
20 vuk ~ #
21
22 Still, trying "sudo /usr/libexec/xfsm-shutdown-helper" from the
23 command line gives me:
24
25 michael@vuk ~ $ sudo /usr/libexec/xfsm-shutdown-helper
26 Password: (trying the root password)
27 Sorry, try again.
28 Password: (^C)
29 sudo: 1 incorrect password attempt
30 michael@vuk ~ $ sudo /usr/libexec/xfsm-shutdown-helper
31 Password: (trying my own password)
32 Sorry, user michael is not allowed to execute '/usr/libexec/xfsm-shutdown-helper' as root on vuk.
33 michael@vuk ~ $
34
35 ...and the options to shut down or reboot are still grayed out in the
36 Xfce quit dialog box.
37
38 I checked /etc/group and did not find any obvious group I should add
39 myself to (say, `sudoers' or something like that). I use PAM and
40 /etc/pam.d/sudo (autogenerated) uses system-auth for auth, account,
41 password and session.
42
43 Am I missing something here?
44
45 --
46 Michael Kjörling, michael@××××××××.com - http://michael.kjorling.com/
47 * ASCII Ribbon Campaign: Against HTML Mail, Proprietary Attachments *
48 * ..... No bird soars too high if he soars with his own wings ..... *