Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Shutdown System Policy Question

  1. #11
    Join Date
    Sep 2008
    Beans
    1,024
    Distro
    Ubuntu Development Release

    Re: Shutdown System Policy Question

    Found something here:

    The easy way around it seems to be to add your users to the group 'users', then create a policykit rule to allow users of that group permission to shut down and another to restart when other users are logged in to the system.

    Code:
    # /var/lib/polkit-1/localauthority/50-local.d/shutdown.pkla
    [system shutdown privs]
    Identity=unix-group:users
    Action=org.freedesktop.consolekit.system.stop-multiple-users
    ResultAny=no
    ResultInactive=no
    ResultActive=yes
    Code:
    # /var/lib/polkit-1/localauthority/50-local.d/restart.pkla
    [system restart privs]
    Identity=unix-group:users
    Action=org.freedesktop.consolekit.system.restart-multiple-users
    ResultAny=no
    ResultInactive=no
    ResultActive=yes
    As the top line of each snippet suggests you want to create these files in '/var/lib/polkit-1/localauthority/50-local.d/' with the names 'shutdown.pkla' and 'restart.pkla', so 'sudo gedit', 'sudo kedit', or whatever editor you prefer.

    If you prefer you can specify individual users who you want to give permission to in the identity line instead of adding them to a group and using the group identity:

    Code:
    Identity=unix-user:fu;unix-user:bar
    Then after the rules are created type:

    Code:
    sudo /etc/init.d/hal restart
    to activate the rules.

    That still leaves the question as to why the system thinks another user is logged in.

    Later, Seeker
    Last edited by seeker5528; November 17th, 2009 at 10:38 AM.

  2. #12
    Join Date
    Nov 2009
    Beans
    1

    Thumbs up Re: Shutdown System Policy Question

    I solved this problem on my machine by following the instructions as outlined in article: http://www.len.ro/2009/11/karmic-various-tricks/

    It was a very simple fix and as I am not a programmer it took me maybe 5 minutes and three simple steps. Good luck and thanks to the author of this article!

  3. #13
    Join Date
    Dec 2009
    Beans
    18

    Re: Shutdown System Policy Question

    I got the file edited but it will not let me save it because I do not have permission. I am the only user set up on the machine AND I am pretty sure I am an admin......new to linux so any help would be great! This just started happening and it is really annoying!

  4. #14
    Join Date
    Sep 2008
    Beans
    1,024
    Distro
    Ubuntu Development Release

    Re: Shutdown System Policy Question

    You have to use sudo from the command line to open whatever editor you want to use:

    Code:
    sudo nano /var/lib/polkit-1/localauthority/50-local.d/shutdown.pkla
    If you prefer gedit or some other editor, put that in place of nano, if you are following the other instructions that modify the file included with the policy-kit stuff, use that path an file name.

    Later, Seeker

  5. #15
    Join Date
    Dec 2009
    Beans
    18

    Re: Shutdown System Policy Question

    Thanks Seeker! That command line did the trick!

    Have a great one!


  6. #16
    Join Date
    Aug 2009
    Location
    San Antonio, Tx
    Beans
    26
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Shutdown System Policy Question

    i did this and it work perfectly

    now I can't take credit for this as I found this on a helpful page
    but it works...

    go into a terminal
    type

    sudo gedit /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy
    it will come up with the file, just cut and paste this into the file (over wite everything there)
    I made a backup of the current file first


    this is what you need to use


    <?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>

    <action id="org.freedesktop.consolekit.system.stop">
    <description>Stop the system</description>
    <message>System policy prevents stopping the system</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>yes</allow_active>
    </defaults>
    </action>

    <action id="org.freedesktop.consolekit.system.stop-multiple-users">
    <description>Stop the system when multiple users are logged in</description>
    <message>System policy prevents stopping the system when other users are logged in</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <!--<allow_active>auth_admin_keep</allow_active>-->
    <allow_active>yes</allow_active>

    </defaults>
    </action>

    <action id="org.freedesktop.consolekit.system.restart">
    <description>Restart the system</description>
    <message>System policy prevents restarting the system</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <allow_active>yes</allow_active>
    </defaults>
    </action>

    <action id="org.freedesktop.consolekit.system.restart-multiple-users">
    <description>Restart the system when multiple users are logged in</description>
    <message>System policy prevents restarting the system when other users are logged in</message>
    <defaults>
    <allow_inactive>no</allow_inactive>
    <!--<allow_active>auth_admin_keep</allow_active>-->
    <allow_active>yes</allow_active>

    </defaults>
    </action>

    </policyconfig>
    then save it...
    it will allow the normal shut down
    Last edited by Rick1971; January 19th, 2010 at 06:41 PM.
    "It's easier to ask for forgiveness than to ask for permission"


  7. #17
    Join Date
    Oct 2009
    Beans
    2

    Re: Shutdown System Policy Question

    At least in my case, this occurs only when mythtv-backend is running. I verified this by shutting down the myth backend, then trying a reboot or shutdown, and noting that the prompt did not appear. I suspect the system sees the myth backend running, as user mythtv (which is a valid user account), and triggers the prompt.

    I wonder if the same thing happens when someone has apache (or any other daemon that runs in its own user account) running. In any case, it looks to me like a weakness in policykit, counting a daemon as a logged-in user.

  8. #18
    Join Date
    Nov 2009
    Location
    Devon, UK
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Shutdown System Policy Question

    Yep, just tagging on the end in case someone else finds this thread...

    My Ubuntu 9.10 system has been able to shutdown for ages until I recently installed MythTV on top of Ubuntu (rather than the specific "MythBuntu")

    And now I've started seeing this - seems strange that you're allowed to startup and log straight in without any authorisation, but if you want to shutdown / reboot, then that needs a security check??? Not sure that's quite consistent.

    Anyway, I'm guessing that something in MythTV changes this policy (editing the file as mentioned above, worked fine).

    Next... I'll check on the Myth forums.

  9. #19
    Join Date
    Sep 2009
    Location
    Lake George, Colorado
    Beans
    105
    Distro
    Ubuntu 10.04 Lucid Lynx

    Talking Re: Shutdown System Policy Question

    Yes - Definitely MythTV doing this. I was going to check out MythTV (and MythNetTV) soon, but went ahead, and installed it. Then my 'puter was prompting me to enter my password before shutting it down.
    I was going to post a new thread on this, but I was a good boy, and searched for this thread for a while. After reading the last few posts here, I went into the Synaptic Package Manager, and uninstalled anything that had to do with MythTV. No more password prompt.
    I suppose it would have been better to configure something in the MythTV (backend?) instead of outright uninstalling it, but it was the "quick fix" in my instance.
    Thanks for all your feedback. May the Ubuntu Gods shine down on you!

  10. #20
    Join Date
    Feb 2010
    Beans
    20
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Shutdown System Policy Question

    I had the same problem in my Karmic...
    removed MythTV...and can switch off again without password prompt!!
    Thanks!

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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