You are not logged in.

#1 2013-03-29 22:52:37

frostyfrog
Member
From: Utah, USA
Registered: 2011-03-27
Posts: 42

[SOLVED] Disable Polkit Services?

Is it possible to disable the services offered by polkit, easily? I'm really tempted to run `sudo rm /usr/share/polkit-1/actions/*` at this point because I think users should be denied shutdown access (and other things offered to standard users via polkit) if they don't use sudo. Just my opinion since I'm running a multi-user server with Arch. Only downside to running that command is that the next time I update, they will reappear... I guess I could empty them, but I would rather just disable polkit altogether if at all possible.

Edit: Found out that all I had to do was add this to /etc/polkit-1/rules.d/99-deny-all.rules:

polkit.addRule(function(action, subject) {
    return polkit.Result.YES;
});

Also that man polkit... I kept doing man polkitd xP

Last edited by frostyfrog (2013-04-28 05:24:38)


{arch32} {subtlewm}{Acer Aspire One AO532h}
{arch64} {Headless Server}
Grrr! 400 char limit sad

Offline

#2 2013-03-30 00:16:29

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,134

Re: [SOLVED] Disable Polkit Services?

Please do your own research before posting. For example:

man polkit

CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-03-30 00:33:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,548
Website

Re: [SOLVED] Disable Polkit Services?

`pacman -Rsn polkit`

done.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2013-03-30 11:33:43

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,952

Re: [SOLVED] Disable Polkit Services?

A workaround would be to use something like startx -- vt7 .

Using that results in the X session NOT being a valid logind session and thus any polkit/logind settings will be ineffective.
NOTE : this will also break automounting and other polkit/logind related permission stuff


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2013-03-30 11:54:43

progandy
Member
Registered: 2012-05-17
Posts: 5,201

Re: [SOLVED] Disable Polkit Services?

You could try something like this to prohibit all polkit actions:

# cat /etc/polkit-1/localauthority/90-mandatory.d/99-deny-all.pkla
[Always require admin]
Identity=unix-group:users
Action=*
ResultAny=no
ResultInactive=no
ResultActive=auth_admin

http://askubuntu.com/questions/184085/p … roup-wheel
https://wiki.archlinux.org/index.php/PolicyKit

Last edited by progandy (2013-03-30 11:57:18)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB