how to allow vncserver restart ??

Sean Darcy seandarcy2 at gmail.com
Thu Feb 27 09:02:30 PST 2014


On Fedora 19, updated. We have a group of users who use vnc. For various 
reasons the vnc service on the server goes down periodically. I've 
created small scripts for each user to restart the user's service:

systemctl restart vncserver@:2

but that fails with the cryptic dbus error messages:

dbus[540]: [system] Rejected send message, 2 matched rules; 
type="method_call", sender=":1.8319" (u
id=504 pid=1680 comm="systemctl stop vncserver@:2 ") 
interface="org.freedesktop.systemd1.Manager" member="StopUnit" error 
name="(unset)" requested_reply="0" 
destination="org.freedesktop.systemd1" (uid=0 pid=1 
comm="/usr/lib/systemd/systemd --switched-root --system ")
dbus[540]: [system] Rejected send message, 2 matched rules; 
type="method_call", sender=":1.8320" (u
id=504 pid=1683 comm="systemctl start vncserver@:2 ") 
interface="org.freedesktop.systemd1.Manager" member="StartUnit" error 
name="(unset)" requested_reply="0" 
destination="org.freedesktop.systemd1" (uid=0 pid=1 
comm="/usr/lib/systemd/systemd --switched-root --system ")

AFAICT, sudoers doesn't help, it's a dbus thing.

So now an administrator has to restart the service and the users are 
_really_ unhappy having to find a sysadmin.

I'm actually considering just giving them the root password.

We've read the dbus tutorial and various intro's, done of which seem to 
the point. I seems we need to edit/create a file in /etc/dbus-1/system.d 
, though the error message points to org.freedesktop.systemd1.Manager 
which is in 
/usr/share/dbus-1/interfaces/org.freedesktop.systemd1.Manager.xml.

I'd to let any user restart a vncserver service. But I'd be ok with 
letting any user restart _any_ serivce if that's what's needed.

Thanks for any help.

sean
-



More information about the dbus mailing list