Questions tagged [polkit]

Polkit (formerly PolicyKit) is a component for controlling system-wide privileges in Unix-like operating systems.

Filter by
Sorted by
Tagged with
1
vote
1answer
41 views

Setup .pkla rule for polkit

I'd like to start a systemd service using DBus in one of my apps which is run as non-root user myuser. For that I need to set up a PolicyKit where I'm using polkit 0.105 and added the following .pkla ...
0
votes
1answer
29 views

What JavaScript interpreter does Polkit use to interpret rules.d files?

What JavaScript interpreter does Polkit use to interpret rules.d files? The source code at time of writing links to a defuct Wikipedia heading "ECMAScript.2C_5th_Edition", however that would only be ...
-1
votes
2answers
27 views

What is polkitd doing when it is pinning 2 out of 4 CPUs for many hours?

I run a park of machines for a charity and do not get paid for this. We have a zoo of various OSs running on machines donated by sponsors. They are wiped clean and installed what is best expected to ...
0
votes
0answers
29 views

Error when installing software using a GUI

I'm running Feren OS which is based off of Ubuntu, Linux Mint, and Debian. Whenever I try to install or update software using a GUI like Store or Update Manager, I get this error: org.freedesktop....
0
votes
1answer
15 views

Does polkit.Result.NO deny actions even to the root user?

E.g. in this example from the Arch Wiki, does systemd-logind still permit the root user to request suspend and hibernation? The following rule disables suspend and hibernate for all users. /...
0
votes
1answer
37 views

polkit rule: determine if user is an admin?

polkit is configured using rules files, written in javascript. You write custom functions, and pass them as the argument to polkit.addRule(). When a polkit action is performed, the functions are ...
0
votes
1answer
75 views

The *correct* way to require root for changes via nmcli to NetworkManager

What is the correct way, with a single command or a small polkit addition, to limit all unprivileged users to read-only usage of nmcli? Edit: Allowing only a privileged unix group, in addition to ...
-1
votes
1answer
23 views

polkit pins CPU for prolonged periods of time

Whenever I start the system, polkitd pins 1 core at 100% during at least 4-6 hours with high disk IO and gradual increase in memory consumption. Is polkit in the recent Linuxae a malware? After ...
0
votes
0answers
22 views

Pokit Authentication Agent (Gnome) doesn't work in certain applications

I am using Arch Linux x86_64 with the i3-gaps WM. I have installed polkit-gnome to use as the authentication agent for my user. It works great, except for instances where the application 'knows that ...
0
votes
0answers
260 views

Unable to restart Polkit service in Centos 7

I am unable to start nscd.service on centos 7 the error is polkit service is not running. Below is error. ** (pkttyagent:27796): WARNING **: Unable to register authentication agent: GDBus.Error:org....
2
votes
1answer
72 views

systemd service management using pkla equivalents to polkit's rules on Debian

I'm trying to allow users of a somegroup to manage someunit systemd service. In polkit (>=0.106), this can be done by adding rules: /etc/polkit-1/rules.d/20-someunit.rules --- polkit.addRule(...
8
votes
2answers
2k views

Restarting systemd service only as a specific user?

I created some systemd services which basically works: location: /etc/systemd/system/multi-user.target.wants/publicapi.service content: [Unit] Description=public api startup script [Service] ...
3
votes
1answer
216 views

How to block shutdown or reboot in Debian xfce when other users logged in

I want to prevent users to start shutdown or reboot when another user is logged in. Users can be a TTY user (Ctrl+Alt+F3) or a ssh user from a client host. In OpenBSD, I use polkit org.xfce.session....
0
votes
0answers
244 views

What is polkitd doing when running ssh?

This will cause polkitd to burn CPU like crazy: parallel ssh localhost echo ::: {1..1000} From top: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ...
2
votes
1answer
455 views

Shutdown, suspend require authentication when scheduled in at

I'd like to suspend my laptop using at: echo "systemctl suspend" | at now + 5 minutes Suspension does not happen, instead I find a mail from at in /var/spool/mail/me: Failed to set wall message, ...
0
votes
0answers
57 views

journalctl -f is spamming “cannot create session” and “session opened for root user”, how can I get it to stop/fixed?

I'm using fedora 28. I don't understand why I'm getting these messages and would love some help so I can use journalctl -f for other things. This is a fresh terminal window and I hadn't tried su ...
0
votes
0answers
1k views

Policy Kit isn't working properly?

Linux Mint 19 x64 with Cinnamon Whenever I try to install a .deb by double clicking the file and clicking "Install Package" on the Package Installer popup, I get the following error: There seems ...
0
votes
0answers
37 views

How do I make audio continue to play when I switch to other consoles&users with Ctrl+Alt+Fn?

Is it possible to tell polkit to allow some players or some users to continue to play their audio during another user session? Or is there another workaround that does not involve... see below? I don'...
3
votes
1answer
1k views

openSuse: how to get rid of annoying “Authentication Required” dialog from auto-update

This annoying dialog "Authentication Required" started to pop up recently, just after every login to KDE, demanding root password to refresh system repositories. After a minute or so it disappears on ...
1
vote
0answers
106 views

Linux - How to distribute as portable a root-only GUI application

With portable i mean an application that can be used for example for an USB drive, and don't require to 'touch' the OS file-system for run. Under Windows, I can distribute a .zip -> .exe -> ....
2
votes
1answer
363 views

Why does hostnamectl not require a password to change the hostname?

It seems that the new way to change the hostname with systemd is: hostnamectl set-hostname NEWNAME However, this does not require a password when logged in as a user with admin rights (not sure ...
0
votes
1answer
4k views

Trying to run “service nginx restart” from a non root user

I'm pretty new to the deployment world but this is what's going on. I have a new Ubuntu (Ubuntu 16.04.4 LTS) droplet from DigitalOcean. I installed and configured nginx and everything is working ...
2
votes
1answer
373 views

How to allow running notify-send as another user with pkexec?

As continuation of this question (How can I send a notification with polkit 0.106?), I've discovered that I have to execute notify-send as the user who I want to send notification. But, with my ...
0
votes
0answers
79 views

How to send notification when user press shutdown button in the GUI?

I am writing a program to remind extract the pendrive before shutdown. This program locks shutdown if pendrive is connected, and unlock it if pendrive is disconnected. For do this, I use a polkit ...
2
votes
3answers
263 views

How can I send a notification with polkit 0.106?

I am developing a application to don't forget the pendrive. This app must lock the shutdown if a pendrive is connected to the machine. As this form, if the user wants to shutdown the system while a ...
3
votes
2answers
3k views

One prompt pkexec - two command

Someone could answer me how make one prompt via pkexec when I've to use two command with authentication? My easy sample script: pkexec virsh net-start default; pkexec "/home/user/program"; I'm new ...
2
votes
0answers
541 views

systemd root authentication every new shell session

I'm running Debian stable 9.3. Since last month I have a problem with systemd behaviour. I suppose it's not Debian specific--it's rather systemd. Every new instance of shell session I'm asked to type ...
2
votes
1answer
308 views

pkexec - how do I set a custom timeout for auth_admin_keep when writting a pkexec policy

I was just reading the reference manual written by David Z for pkexec on freedesktop.org: https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html and https://www.freedesktop.org/...
0
votes
1answer
633 views

polkit rules not recognized raspbian stretch

I'm running a raspbian stretch and I want to grant every member of group user the right to mount and unmount usb-pendrives Therefore I installed: udisks2 I created a *.rules file /usr/share/polkit-1/...
1
vote
0answers
2k views

CentOS 7.2 dbus can't active polkit but can start polkit service manual

I just use CentOS 7.2, and default systemd version (systemd 219) used by CentOS 7.2; I just find my physical host, systemctl command can not use. eg. if I execute systemctl restart syslog-ng it will ...
1
vote
0answers
67 views

Prevent polkit from listing users

How do I disable output for user list and do auth with current invoking user in policykit? This sick message below compromising security on my server/pc revealing the user names! Multiple identities ...
2
votes
0answers
130 views

libvirt/debian: Restrict user/domain access

I'm using Debian 9, Stretch, and if I add a user to the libvirt group, that user has full access to libvirt. That's fine and dandy, but what if I want to restrict user access to certain domains? ...
3
votes
0answers
843 views

Polkit rule for systemd template unit files

I'm trying to figure out how to write a polkit rule for a systemd template file. The rule is triggered when I use the actual service that will be instantiated (openvpn-client@miami.service) but not ...
0
votes
1answer
70 views

polkit.d - no such file or directory

When consolekit starts on my system, polkitd also starts and during that startup, I see an error message complaining that polkitd cannot find files that exist. I checked the permissions and they seem ...
0
votes
0answers
378 views

Polkit uses 100% CPU on a hardened Gentoo Linux profile?

I've just recently noticed that polkitd uses 100% of the CPU on a hardened Gentoo Linux profile. I use Gentoo Linux (testing), and have recently switched to a hardened profile. I tested this issue ...
0
votes
2answers
1k views

polkit rule is not working

policykit-1 version 0.105-17 I cannot seem to make the policykit rule work. All I want is to let anyone be able to run systemctl daemon-reload in the system (for test purposes). I found the action ...
2
votes
1answer
933 views

Polkit/Consolekit is not working in openRC

some time ago I moved from Systemd to OpenRC. It was very different, to be able to use audio and webcam I had to add my user to the audio, optical and video group. As some software uses pkexec to be ...
1
vote
1answer
572 views

How verify the current scheduling policy running in a embedded Linux?

I am testing a ARM based embedded target running with customized embedded linux version 3.14. Is there any way that I can find out which scheduling policy my linux is using at runtime? I see some /...
4
votes
2answers
2k views

polkit-gnome-authentication-agent-1 doesn't auto start after upgrade

The polkit-gnome-authentication-agent-1 doesn't autostart while it has correct /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop file with this content [Desktop Entry] Name=PolicyKit ...
2
votes
0answers
268 views

How Widely Used is Polkit? [closed]

I'm writing a program that requires root access. I'm hoping to use polkit for privilege escalation instead of just erroring out when the program is not run from root or via sudo. Is polkit used on ...
7
votes
2answers
2k views

Explanation of file - org.freedesktop.login1.policy

I am using Ubuntu 16.04. There is a file located at /usr/share/polkit-1/actions/org.freedesktop.login1.policy which seems to control the permissions regarding shutdown/suspend/hibernate options. ...
2
votes
1answer
92 views

Which service is registered for certain interface on D-Bus?

I know PolKit uses org.freedesktop.PolicyKit1.AuthenticationAgent interface to connect to authentication agent. I want to know which service is registered for this interface. What is the best way to ...
3
votes
1answer
4k views

Adding permissions for udiskie-mount to policykit

I'm using Debian jessie/stable (8.4). When I try to mount an external USB drive using udiskie-mount from inside a cron job, I get an error as follows below. Using udiskie-mount directly from the ...
10
votes
1answer
34k views

systemctl keeps timing out on service restart

I'm running CentOS 7.2; see below: # systemctl stop firewalld Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was ...
3
votes
1answer
2k views

gksu replacment

In the old days of CentOS 5 i had an application that run as another user. I created a .desktop file which run a command that looked like this: gksu -u anotheruser someapplication When the user ...
0
votes
1answer
1k views

How do I use fingerprint-gui's polkit agent with GNOME Shell?

I'm using Arch Linux, and have installed fingerprint-gui from AUR. It detected the sensor after I added myself to the plugdev and scanner groups. After prepending the following to /etc/pam.d/system-...
3
votes
0answers
1k views

What to do if apt-get -f install fails? [closed]

I'm in a difficult situation. Using Debian Jessie / Stretch, apt-get -f install fails. The system is effectively stuck. I've sshed in now. As far as login terminals, only one was becoming ...
2
votes
0answers
101 views

Giving a user access to the webcam

I have a user that I use to run untrusted programs (more specifically, Skype). I would like to give that user access to the webcam. I am using Debian, where the standard way to do this is to put ...
8
votes
1answer
998 views

How does gnome reboot without root privileges?

I am reading the book Linux kernel development, in chapter 5 "System Call Implementation" page 77 says For example, capable(CAP_SYS_NICE) checks whether the caller has the ability to modify nice ...
4
votes
1answer
3k views

What are the default Polkit privileges on Arch Linux for shutdown, halt, etc., and why are they so?

On Arch Linux, with systemd, the following commands are all symlinks to systemctl: /usr/bin/telinit /usr/bin/poweroff /usr/bin/runlevel /usr/bin/reboot /usr/bin/halt /usr/bin/shutdown I find their ...