Remember authorization mounting partition in PolicyKit Ubuntu 9.10 Karmic

How to make some actions available automatically, without the password, with PolicyKit in Ubuntu 9.10 Karmic? For example, don't have to enter password every time mounting other NTFS partition.

The new policykit-1 which supercedes the old policykit doesn't seem to have a gui for adjusting authorizations. The policies are stored as xml files in /usr/share/polkit-1/actions.

1) Note the service attempting the action and find the appropriate policy in the actions directory. In your case it's org.freedesktop.devicekit.disks.policy.

2) Edit the file in your favorite editor and find the right action (e.g., org.freedesktop.devicekit.disks.filesystem-mount-system-internal) or type this in terminal.

sudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy

3) The defaults key controls the access. Check the manpage for polkit for all the details, but allow_any controls every client, allow_inactive controls clients outside of the currently active session and allow_active controls access in the active session. You care about the allow_active key

4) Selecting a key value of "no" denies access, "yes" implicitly permits access, "auth_user" requires user authentication, "auth_admin" requires admin authentication. "auth_user_keep" and "auth_admin_keep" function similarly but retain authentication for a few minutes afterward. Changing the allow_active key's value to "yes" should stop the authentication demands.

5) Save the file and it should take effect immediately.

Credit to Pjomega

0 Responses to "Remember authorization mounting partition in PolicyKit Ubuntu 9.10 Karmic"