Home / Alt manpages / polkitd(8)

  • polkitd(8)
  • Admin command
  • linux

Diagnose polkitd Activation and Service Health

You will finish with a read-only check of polkitd, the polkit system daemon, and a short path for investigating activation failures. The examples use polkit 124 from Ubuntu package polkitd 124-2ubuntu1.24.04.4, installed as /usr/lib/polkit-1/polkitd.

Allow about fifteen minutes. You need a shell and, for some log views, permission to read the system journal. Most commands below are ordinary user commands. sudo is only shown where the host may restrict access. This guide does not edit policy, restart a service or run the daemon directly.

1. Confirm the installed daemon and package

Start by checking which binary and package your shell would use. These commands only read local metadata:

$ command -v polkitd
/usr/lib/polkit-1/polkitd
$ dpkg-query -W -f='${Package} ${Version}\n' polkitd
polkitd 124-2ubuntu1.24.04.4

The exact version and path vary by distribution. Keep the output with any bug report because daemon options and service integration are package-specific. On a non-Debian system, use that system's package query tool instead of guessing a version from the manual page date.

Checkpoint: if command -v prints nothing, the package may not be installed or the executable may not be on your PATH. Do not create a symlink or copy a daemon into place. First identify the package supplied by your distribution.

2. Read the daemon's contract

The installed polkitd(8) manual has a deliberately small synopsis: polkitd takes no normal positional workload. It provides the org.freedesktop.PolicyKit1 D-Bus service on the system bus. D-Bus or systemd starts it when an application needs the service, so an administrator normally does not start it in a shell.

It must begin with superuser privileges, then drops privileges early to the unprivileged polkitd system user. That is a daemon-startup contract, not an invitation to run it as root yourself. Bypassing the service manager can omit the unit's sandbox and produce a process that is difficult to supervise correctly.

Inspect the available command-line interface without launching the daemon:

$ polkitd --help
Usage:
  polkitd [OPTION?] polkit system daemon

Help Options:
  -h, --help         Show help options

Application Options:
  -r, --replace      Replace existing daemon
  -n, --no-debug     Don't print debug information

The --help output is the safe probe. Do not use --replace as a repair step: replacing an existing authority is a disruptive, security-sensitive action and is not needed for ordinary service recovery.

3. Check the systemd service

On a systemd host, inspect the unit and current state:

$ systemctl status polkit.service --no-pager
● polkit.service - Authorization Manager
     Loaded: loaded (.../polkit.service; static)
     Active: active (running) ...
       Docs: man:polkit(8)
     CGroup: /system.slice/polkit.service
             └─... /usr/lib/polkit-1/polkitd --no-debug

Process IDs and timestamps change. The useful checks are Loaded, Active, and the command line. A static unit is commonly activated as a dependency or through D-Bus, rather than enabled for a boot-time start. An inactive unit is not automatically a fault: an idle, D-Bus-activated service can be absent until a client requests it.

Read the unit definition to confirm how this package starts the daemon:

$ systemctl cat polkit.service
...
Type=dbus
BusName=org.freedesktop.PolicyKit1
ExecStart=/usr/lib/polkit-1/polkitd --no-debug
User=polkitd
...

The exact hardening lines differ between distributions. On this installation, the service is tied to the D-Bus name, starts with --no-debug, runs as polkitd, and has systemd restrictions such as a private temporary directory and a protected system view. Treat those restrictions as part of the deployment, not as decoration.

Checkpoint: if the status shows failed, record the first failure and the unit's ExecStart line before changing anything. If it shows inactive and there is no client waiting for polkit, that may be normal.

4. Check D-Bus activation

When systemd status is unclear, inspect the installed D-Bus service file:

$ sed -n '1,80p' /usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service
[D-BUS Service]
Name=org.freedesktop.PolicyKit1
Exec=/usr/lib/polkit-1/polkitd --no-debug
User=root
SystemdService=polkit.service

This file explains the apparent privilege mismatch. D-Bus requests activation as a system service, systemd owns the service unit, and the daemon then drops privileges as described by its manual. Do not edit the activation file to change the user or executable. A local change could weaken the authority or leave systemd and D-Bus disagreeing about ownership.

To ask systemd for the unit's D-Bus-related properties, use a read-only query:

$ systemctl show polkit.service -p Type -p BusName -p User -p ExecStart --no-pager
Type=dbus
BusName=org.freedesktop.PolicyKit1
User=polkitd
ExecStart={ path=/usr/lib/polkit-1/polkitd ; argv[]=/usr/lib/polkit-1/polkitd --no-debug ; ... }

Do not expect every systemd version to format ExecStart identically. Check the property names and values, not the punctuation around them.

5. Read failure evidence

Ask the journal for recent unit messages. This does not restart or reload anything:

$ journalctl -u polkit.service -b --no-pager -n 80
Sep 25 06:49:49 host systemd[1]: Started polkit.service - Authorization Manager.
Sep 25 06:49:49 host polkitd[...]: Started polkitd version 124

Your output may instead contain a missing library, a refused D-Bus name, a policy parse error or a service sandbox denial. If the journal says access is denied, retry only the read with elevated privilege:

$ sudo journalctl -u polkit.service -b --no-pager -n 80

Do not respond to a startup failure by repeatedly running sudo polkitd. That can create a second authority, hide the original unit error and alter the security context. Fix the package, unit or policy issue identified by the logs, then let the normal activation path start the service.

6. Recover through the owner of the service

If the unit is failed and you have confirmed that a retry is appropriate, the controlled recovery action is a systemd restart:

$ sudo systemctl restart polkit.service
$ systemctl status polkit.service --no-pager
● polkit.service - Authorization Manager
     Active: active (running) ...

This briefly interrupts the authorisation service. Applications making policy decisions may fail while it is down, so use a maintenance window on a busy host. If the restart fails, stop repeating it and return to the journal from step 5. The recovery for a configuration mistake is to restore the previous policy or package file from your system's backup and then retry the unit, not to leave a manually started daemon running.

There is no undo command for a successful restart. The service manager owns the process and will normally stop it when you run sudo systemctl stop polkit.service, but stopping the authority can break desktop and system administration operations. Use stop only as an explicit maintenance action, then start or trigger the service through its documented unit and verify its state.

Done means

  • You recorded the installed polkitd path and package version.
  • You confirmed that normal operation is D-Bus or systemd activation, not a shell launch.
  • You checked the unit state, D-Bus name and service user.
  • You read journal evidence before attempting recovery.
  • You used sudo only for restricted inspection or an intentional service action.
  • You did not alter policy files, activation metadata or the daemon's privilege model.