Find the answer to your Linux question:
Results 1 to 4 of 4
I am in the process of migrating my AntiX partition to systemd, which I used previously in Arch. I can boot with it but I can't shut down in my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,258

    Can't shut down systemd without going to root


    I am in the process of migrating my AntiX partition to systemd, which I used previously in Arch. I can boot with it but I can't shut down in my own name. When I try, I get the message Failed to issue method call: Access denied.

    The journal shows the following message from Dbus:

    Nov 18 18:13:37 Scenic dbus-daemon[394]: dbus[394]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.21" (uid=1000 pid=1693 comm="systemctl poweroff ") interface="org.freedesktop.systemd1.Manager" member="StartUnit" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/bin/systemd ")
    Nov 18 18:13:37 Scenic dbus[394]: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.21" (uid=1000 pid=1693 comm="systemctl poweroff ") interface="org.freedesktop.systemd1.Manager" member="StartUnit" error name="(unset)" requested_reply="0" destination="org.freedesktop.systemd1" (uid=0 pid=1 comm="/bin/systemd ")

    I don't know whether the problem lies with dbus itself or with perhaps with policykit or consolekit. I have noticed that both these services need to be running in order for my poweroff command to be processed, or there is a significant delay while systemd starts them (Arch does not use consolekit and user poweroff works there).
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,696
    Is the shutdown command being executed setuid to root, and owned by root?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,258
    Quote Originally Posted by Rubberman View Post
    Is the shutdown command being executed setuid to root, and owned by root?
    Under systemd, you shut down with the systemctl command. No, it isn't suid and there are probably good reasons why it should not be made suid. systemctl does an awful lot of jobs, some of which really should be left to the system administrator (for example starting and stopping services). But it is supposed to let any user shut down or reboot providing that she is the sole user at the time. If not, it should prompt for the root password, not just kick you out.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,696
    Quote Originally Posted by hazel View Post
    Under systemd, you shut down with the systemctl command. No, it isn't suid and there are probably good reasons why it should not be made suid. systemctl does an awful lot of jobs, some of which really should be left to the system administrator (for example starting and stopping services). But it is supposed to let any user shut down or reboot providing that she is the sole user at the time. If not, it should prompt for the root password, not just kick you out.
    I totally agree with you Hazel, but from the way you stated the original question it sounded like you might have been trying to shut down as a regular user... Sorry, but I'm not being much help for you here!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •