I'm trying to get some user to start, stop and reload services by using the udev Upstart interface. I'm using Ubuntu 10.04.

I created the file /usr/share/polkit-1/actions/com.ubuntu.Upstart0_6.Job.policy

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>
  <vendor>UXITIC</vendor>
  <vendor_url>http://citius.usc.es/</vendor_url>
  <icon_name>gdm</icon_name>

  <action id="com.ubuntu.Upstart0_6.Job.Stop">
    <_description>Stops a service</_description>
    <_message>Privileges are required to stop a service.</_message>
    <defaults>
      <allow_inactive>no</allow_inactive>
      <allow_active>auth_admin_keep</allow_active>
    </defaults>
  </action>
</policyconfig>

And also the corresponding authority file /etc/polkit-1/localauthority/50-local.d/10-allow-users-to-start-and-stop-services.pkla

[Stop services]
Identity=unix-user:jorge
Action=com.ubuntu.Upstart_0.6.Job.Stop
ResultAny=no
ResultInactive=no
ResultActive=auth_self

But when I try to stop a service, I get Access Denied :(

jorge$ dbus-send --print-reply --system --dest=com.ubuntu.Upstart /com/ubuntu/Upstart/jobs/ssh com.ubuntu.Upstart0_6.Job.Stop array:string:'' boolean:true
Error org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 1 matched rules; type="method_call", sender=":1.452" (uid=1021 pid=28234 comm="dbus-send) interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
share|improve this question

closed as off-topic by WinEunuuchs2Unix, Pilot6, karel, Charles Green, Eric Carvalho Jul 18 '17 at 13:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – WinEunuuchs2Unix, Pilot6, karel, Charles Green, Eric Carvalho
If this question can be reworded to fit the rules in the help center, please edit the question.

    
This question appears to be abandoned and unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Thanks! – Eric Carvalho Mar 12 '13 at 19:05
    
As @EricCarvalho points out this question is abandoned however that can't be a VTC reason as discussed recently here: meta.askubuntu.com/questions/17094/…. This question is about Ubuntu 10.04 which hit EOL on April 30 2015. However as link points out we can't close as EOL even if it has zero answers. Therefore as per link VTC as not reproducible. – WinEunuuchs2Unix Jul 18 '17 at 0:15