LinuxCommandLibrary

pkcheck

Check PolicyKit authorization for actions

TLDR

Check authorization

$ pkcheck --action-id [org.freedesktop.action] --process [pid]
copy
Check with user
$ pkcheck --action-id [action] --user [username]
copy
Allow user interaction
$ pkcheck --action-id [action] --process [pid] --allow-user-interaction
copy

SYNOPSIS

pkcheck [options]

DESCRIPTION

pkcheck queries the PolicyKit (polkit) daemon to determine whether a specific process or user is authorized to perform a given action. It returns an exit code indicating whether the authorization is granted, denied, or requires authentication.
The tool is primarily used in scripts and system services to check permissions before performing privileged operations. With --allow-user-interaction, it can trigger an authentication dialog, prompting the user for credentials when the action requires it.

PARAMETERS

--action-id ACTION

PolicyKit action ID.
--process PID
Process ID to check.
--user USER
User to check.
--allow-user-interaction
Enable authentication dialog.
--help
Display help.

CAVEATS

Part of PolicyKit. Requires polkitd running.

HISTORY

pkcheck is part of PolicyKit for checking authorization policies.

SEE ALSO

pkaction(1), pkexec(1), polkit(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community