2

I want to remove that unlock button from the top so a normal users allowed to add a printer from gnome control center. I have added the user to the lp group and it works from the cups web administration page. How can enable any user to access that setting ?

enter image description here

1

Late reply but I ran into this requirement today and this post is high in the Google results.

In short, you need to apply a local policykit ... policy, that allows the users you want. The file should be created in /var/lib/polkit-1/localauthority/50-local.d/ named something like 50-printer-open-access.pkla (note, this is the location for policies in debian/ubuntu systems - others I don't know)

Note: please see comments below regarding potential file syntax changes on modern distros, I can confirm the examples below are working on ubuntu 18.04

Example 1, allows literally anyone:

[Printer administration]
Identity=*
Action=org.opensuse.cupspkhelper.mechanism.*
ResultAny=no
ResultInactive=no
ResultActive=yes

Example 2, allows any users in the lpadmin group:

[Printer administration]
Identity=unix-group:lpadmin
Action=org.opensuse.cupspkhelper.mechanism.*
ResultAny=no
ResultInactive=no
ResultActive=yes

A reference I found handy:

  • @don_crissti thanks for the heads up - it appears that ubuntu 18.04 may be using both policykit and polkit then? The ubuntu policykit overrides are still using the ini -style syntax – cleary May 16 '18 at 23:30
  • @don_crissti Thanks again for the heads up - – cleary May 20 '18 at 23:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.