In this video, you will learn about PolicyKit and PKXHack.
So what is PolicyKit?
Well, policy is for application, what sudo is for users, and it allows graphical applications
to prompt for an administrator password.
And that is convenient if you start a graphical application from a graphical environment as
an ordinary user, but the graphical application needs sudo privileges.
Well, PolicyKit can have it prompt for a password.
So PolicyKit offers a framework that provides an authentication API, which is used by privileged
programs to offer services to unprivileged programs.
And it works with rules, and these rules are stored in the file etcpolkit1-rules.d.
Check for instance the etcpolkit1-rules.d-50-default-rules file, which allows members of the wheel group
to run commands with escalated privileges.
The PKXHack command can be used as an alternative to sudo, and that allows you to run tasks
with escalated privileges.
PKXHack can be very convenient, because if ever you mess up by accident the etcsudoers
file, you can always use PKXHack etcsudoers to repair it.
Be careful not to make any typos, because PKXHack is not doing a consistency check.
Let's check it out.
So PolicyKit is a little bit more obscure.
It's mainly working in the background, but it is very convenient for configuring access
to graphical applications.