On Mon, Mar 28, 2011 at 3:29 PM, Liam O'Toole <liam.p.oto...@gmail.com> wrote: > On 2011-03-28, Klistvud <quotati...@aliceadsl.fr> wrote: >> Dne, 28. 03. 2011 13:22:10 je Paul van der Vlis napisal(a): >>> >>> I would like to remove the shutdown option in the Gnome menu, it's to >>> prevent shutdown by mistake. Is here somebody who knows how? > > I looked into this problem last month (following the release of squeeze) > and, after much head scratching and reading of the man page for > pklocalauthority (and then more head scratching), I arrived at the > following alternative solution. > > Create a file in the directory /etc/polkit-1/localauthority/50-local.d/. > Ensure that the name of the file is unique and that it ends in .pkla. To > prevent shutdown and poweroff, and a stanza such as the following to the > file: > > [consolekit] > Identity=unix-user:* > Action=org.freedesktop.consolekit.system.* > ResultAny=no > ResultInactive=no > ResultActive=no > > To prevent suspend and hibernate, add this stanza: > > [upower] > Identity=unix-user:* > Action=org.freedesktop.upower.* > ResultAny=no > ResultInactive=no > ResultActive=no > > The result will be that the relevant options are removed from the System > menu in GNOME. They will still be present at the login screen, but will > be ignored.
Doesn't that prevent anyone from shutting down, etc without su-ing to root in a terminal and doing so there? Wouldn't "ResultActive=auth_admin" be better? (IIUC, you'd have to supply the root password in order to shut down, etc.) I'd add "man polkit" to "man pklocalauthority" as *interesting* reading... -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktikk2chgk1bxeoglut_e5ffio8efshknmsgcw...@mail.gmail.com