Skip to content

Entries tagged "policykit".

Allow the local user to install and update software without root password

This tutorial is for EL6 and possibly Fedora (12, 13, 14 etc); not sure if it will work on other distros.

For my personal laptop or even work station I don't see a reason to require the root password to install or update programs from trusted sources (i.e. repos from which we imported the gpg keys). In order to allow the regular user to perform such actions we use PolicyKit. As such we need to write 2 new pkla (PolicyKit Local Authority) files:
vi /var/lib/polkit-1/localauthority/50-local.d/10-pkgkit-pkginstall-policy.pkla

and copy/paste the following:
[Let All Install Packages]
Identity=unix-user:*
Action=org.freedesktop.packagekit.package-install
ResultAny=no
ResultInactive=no
ResultActive=yes

This will allow all users to install new programs either by using pkcon or its graphical counterpart gpk-application.
In order to update packages we need to write a new pkla:
vi /var/lib/polkit-1/localauthority/50-local.d/10-pkgkit-pkgupdate-policy.pkla

and copy/paste:
[Let All Update Packages]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-update
ResultAny=no
ResultInactive=no
ResultActive=yes

That's about it. Now you can use pkcon install blah or pkcon update as a normal user. Alternatively you can use "System > Administration > Add/Remove software" or "System > Administration > Software update".

Enjoy!