Ubuntu – How to set the Software Center to install software for non-root users

policykitsoftware installationsoftware-center

How can I set the Software Center to allow non-root users to install stuff from the Ubuntu repos without having to type in their password?

I'm fully aware of the security implications, and I am willing to take the risk. Fedora 12 shipped with something like this. (By modifying the PolicyKit configuration, I believe)

Best Answer

You can modify the PolicyKit permissions to allow the users to access the aptdaemon backend that Software Centre uses.

dpkg --listfiles aptdaemon shows that /usr/share/polkit-1/actions/org.debian.apt.policy is the file specifying the actions possible on the aptdaemon backend.

Looking in that file, the < action id=""> tags specify the possible actions. You'd probably want org.debian.apt.install-packages to allow users to install new packages from the archive, and org.debian.apt.update-cache to allow users to update the package lists.

See man pklocalauthority which documents how to set local permissions on PolicyKit actions. Putting the following into /etc/polkit-1/localauthority/50-local.d/10-allow-users-to-install.pkla will allow any user logged in to the local machine to install packages after typing their own password (even when they're not in the admin group) and to update the package cache without typing any password.

[Untrusted Install]

[Untrusted Update]
Related Question