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
0
votes
0answers
55 views

How to avoid polkit error/timeout “Authorization not available” when restarting systemd services as root

On a very small server I have polkit and dbus daemons/services not running in order to save resources and harden the server (these are not needed for normal running and they increase the attack ...
0
votes
0answers
44 views

Cannot modify system configuration

why i cannot add user after install vnc and add the polkit? if i remove the polkit i able to add user from console but rdp didn't work. please help. here is the capture: i am using ubuntu 18.04, ...
0
votes
1answer
49 views

How to achieve Linux privilege escalation by polkitd without password but with Yes/No prompt?

I want to implement Window's UAC like access control using polkit(d). So if I open Network manager or printers, it should ask me yes/no. No password prompt but window must be showed to user. I tried ...
2
votes
1answer
93 views

Controlling systemd system service as user

I have several services that need to be user-controlled and I can't use them as user services (their requirement is system service with root access), plus there is weird GROUP/216 bug that I haven't ...
1
vote
0answers
38 views

How to get rid of nag screen “Authentication is required to set one's own greeter properties”?

After a recent update on my Linux system I get a dialogue window every few (5?) minutes with the same message: Authentication is required to set one's own greeter properties. It has a password ...
1
vote
0answers
191 views

system policy prevents control of network connections

When we log into a KDE seesion using X2Go client, the user is greeted with a dialog asking for a sudo password. I do not want the user to have a sudo password and I would like to prevent the dialog ...
0
votes
1answer
645 views

How can I reboot a server with systemctl if systemctl reboot fails?

I tried rebooting my CentOS 7 server but it gives ridiculous error messages. As root (of course): # systemctl reboot Authorization not available. Check if polkit service is running or see debug ...
1
vote
1answer
78 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
55 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
77 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
34 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
22 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
74 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
227 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
29 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
26 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
375 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
182 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(...
9
votes
2answers
4k 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] ...
4
votes
1answer
351 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
291 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
678 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, ...
1
vote
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'...
4
votes
1answer
2k 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
127 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
470 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 ...
1
vote
1answer
6k 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
441 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
89 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
298 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
621 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 ...
3
votes
1answer
409 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
766 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
68 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
147 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? ...
4
votes
0answers
929 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
82 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
425 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 ...
1
vote
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
991 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
664 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
3k 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
285 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
104 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
36k 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 ...