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: 5,675

Re: [SOLVED] Disable Polkit Services?

Please do your own research before posting. For example:

man polkit

How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

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

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 14,217
Website

Re: [SOLVED] Disable Polkit Services?

`pacman -Rsn polkit`

done.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

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

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,422

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


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

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

progandy
Member
Registered: 2012-05-17
Posts: 2,151

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)

Offline

Board footer

Powered by FluxBB