Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [polkit]

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

-1
votes
1answer
16 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
6 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
57 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
0answers
19 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(...
6
votes
2answers
588 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
156 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
182 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
338 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
46 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
819 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
33 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'...
2
votes
1answer
607 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
95 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
279 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
3k 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
323 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
74 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
247 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
2k 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
513 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
254 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
564 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
votes
0answers
794 views

How to allow a user to configure NetworkManager using Polkit with OpenRC init system

I am running Parabola with OpenRC as my init system and I am having trouble getting Polkit to work with NetworkManager. I installed consolekit-openrc, polkit-consolekit and added consolekit to the ...
1
vote
0answers
1k 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
59 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
117 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
773 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
64 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
350 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
953 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
908 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
506 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
246 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
82 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
3k 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
31k 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
97 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 ...
7
votes
1answer
871 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 ...
1
vote
0answers
131 views

ConsoleKit reports active/is-local only on the second+ login

Running KDE Frameworks 5, Plasma 5, using sddm as a display manager. ConsoleKit and PAM-linux are both installed. Upon login (using the sddm login screen), ck-list-sessions returns FALSE for both is-...
3
votes
2answers
1k views

Xen libvirt access for non-root user

I've installed Xen and libvirt on a CentOS 6.6 machine. All the tools (virt-manager, virsh etc) work perfectly as root (directly or via sudo) but I cannot allow another user to connect (failed to ...
4
votes
1answer
361 views

Late authentication

I run Debian Wheezy with a simple window manager (Blackbox). If I remember correctly, in Ubuntu some applications like Synaptic and Update Manager ask for sudo password only when/if needed. How do I ...
1
vote
0answers
143 views

KDE4 PolicyKit backdoor(misconfiguration) (tested on FBSD10x,PCBSD, probably will work on linux)

recently found subj on FreeBSD 10.x out of the box (with KDE4): [user@fbsd10] /home/user% su Password: su: Sorry [user@fbsd10] /home/user% sudo csh Password: Sorry, user user is not allowed to ...
1
vote
2answers
1k views

Allowing normal user to mount and eject devices

In the file manager PCManFM I can access discs in my USB DVD drive but I cannot eject them or access other USB storage devices - I get the error message "Not Authorized". Any clues? I use Debian 7.7....
68
votes
2answers
143k views

The name > org.freedesktop.PolicyKit1 was not provided by any .service files

When attempting to launch system-config-users from command line, I get the following warning, and the tool does not open. I'm using CentOS 7 with Mate 1.8.1. WARNING **: Error enumerating actions:...