Qubes is demanding a username/password to change printer settings

Qubes has started demanding a (keyring?) username/password to change settings in the Printer Settings box. I have tried my usual username and password to no avail. The Brother DCP-L2550DW prints and scans fine, but I cannot change settings from a vm, other than by scrolling to the bottom of the box and choosing Print Using System Dialog, which then needs to be done for each page printed. I initially set the debian printer template up using the system-config-printer method and it worked fine for some time. Then this problem began. I have tried the system-config-printer command multiple times since, but this does not fix the problem. Today I made a new template, went through the procedure and once done, trying to change print settings via the gui Print Settings box results in the same behaviour. The initial problem arose seemingly out of the blue (updates?) and I have never set up any keyrings to my knowledge or printer specific passwords. The only thing I can think of, is a permissions glitch. However as stated, I can print and scan fine, as long as I don’t try to adjust settings.

A bit of progress. This PolicyKit/CUPS is new to me. I attached the printer to the printer template and then in the template Terminal entered groups. But I only got user and qubes for the groups listing. After a bit of a search I worked my way to /etc/group and found the entries lp and lpadmin with my username attached (also saned with my username.)

Prefer changing options via `system-config-printer` or `lpoptions`/`lpadmin` in a terminal in the same qube that owns the queue,

With my printer attached to the template, would the template be the qube that owns the queue?

I entered the lpstat -v command and yes, the Brother is listed as the printer pointed to.

For your points 2 and 3, I tried system-config-printer again and I still cannot escape the user/pwd prompts. I tried my username with my username login password and also my username with a blank password.

If you paste the exact dialog title/text (and whether it says PolicyKit / CUPS / keyring), people can narrow it further.

I do not know where I would find this dialog referred to unfortunately.

I have 2 printers, an Epsom that just works perfectly without sudo and a Samsung that will not do anything because it keeps asking for a username password. sudo system-config-printer works for me. I use a Debian qube for printing so fedora may be different.

Hth

I still haven’t gotten this sorted out. Would running the linux purge command on cups in my printer template clear out the problem maybe and then reinstall cups? I’m wondering if the problem would be in the multiple config files for cups for instance. Just a thought. I’m out of ideas.

So it sounds like you are referring to the gnome keyring pop up message window. If that is the case (and I have a different setup than you do so I am not completely sure) then you can in fact just set the user and password to empty. I am not sure if that will stop the pop up appearing but I imagine you can then just skip over it. I have the same issue with a vpn and the following link has a solution to removing the pop up from reappearing if you have already set a password.

I guess you could also try removing the gnome-keyring (if that is what it is called) package but sometimes that can be difficult due to dependencies.

hth

Thank you Danan. I will look into this and report back. Cheers

Just to clarify when I said follow the link I meant the one of the comments that states the following

Try deleting /home/user/.local/share/keyrings/ , restart the qube (this makes sure the gnome keyring daemon is using a fresh blank keyring) and try again. I had this issue while making the tests, I solved with it.

Thanks for your perseverance Danan. I did successfully delete the keyrings folders from my standalone debian based printer template and restarted the template to make new keyring folders (I did this twice). Same result. I still couldn’t get rid of the authorization box lockout. So I did the procedure on my personal vm’s keyring folder as well (delete, restart, test). Same result. I did both template and vm, as I wasn’t sure, which one I was supposed to be doing this on and because both had cups installed, when I set up the printer originally way back when. The authorization box I am getting in my personal vm, when I try to modify settings via reads as follows: [personal] Authentication (modifying printer) , username , password. After trying known combinations and getting rejected, “not authorized. The password may be incorrect”

Not knowing, how this all works, I had a look in my Debian 13 xfce template as well, as it is the template upon which my debian printer template is based. Cups is present, but there is no keyrings folder. I expect this is as it should be.

Also I have just gone through the entire procedure of making a new printer template, attaching the printer to it, installing the printer driver and trying to set the printer as default using system-config-printer. This brought up the authorization box as well, when I clicked on Set As Default and then rejected my authorization attempts. I tried all combinations of , my username, my password.

I did get the following in Terminal as a result of using the system-config-printer command. I’m afraid it may as well be in Martian to me.

user@PrnDeb13xfce:~$ system-config-printer

/usr/share/system-config-printer/system-config-printer.py:325: DeprecationWarning: Gtk.ActionGroup.list_actions is deprecated

for action in printer_manager_action_group.list_actions ():

/usr/share/system-config-printer/system-config-printer.py:326: DeprecationWarning: Gtk.Action.set_sensitive is deprecated

action.set_sensitive (False)

/usr/share/system-config-printer/system-config-printer.py:334: DeprecationWarning: Gtk.ActionGroup.get_action is deprecated

act = printer_manager_action_group.get_action (action)

/usr/share/system-config-printer/system-config-printer.py:364: DeprecationWarning: Gtk.UIManager.ensure_update is deprecated

self.ui_manager.ensure_update ()

/usr/share/system-config-printer/system-config-printer.py:365: DeprecationWarning: Gtk.UIManager.get_accel_group is deprecated

self.PrintersWindow.add_accel_group (self.ui_manager.get_accel_group ())

/usr/share/system-config-printer/system-config-printer.py:374: DeprecationWarning: Gtk.UIManager.get_action is deprecated

action = self.ui_manager.get_action (“/new-printer”)

/usr/share/system-config-printer/system-config-printer.py:375: DeprecationWarning: Gtk.Action.create_menu_item is deprecated

newprinteritem = action.create_menu_item ()

/usr/share/system-config-printer/system-config-printer.py:673: DeprecationWarning: Gtk.Action.get_proxies is deprecated

for widget in action.get_proxies ():

/usr/share/system-config-printer/system-config-printer.py:2253: DeprecationWarning: Gdk.threads_enter is deprecated

Gdk.threads_enter ()

/usr/share/system-config-printer/system-config-printer.py:2204: DeprecationWarning: Gdk.threads_leave is deprecated

Gdk.threads_leave ()

/usr/share/system-config-printer/system-config-printer.py:711: DeprecationWarning: Gtk.Menu.popup_for_device is deprecated

self.printer_context_menu.popup_for_device (None, None, None, None,

I get the same warnings

I just fired up an old hp printer and if I run system-config-printer the gui loads but I cannot change any settings because it asks for a username password. I don’t know what it is. If I use sudo system-config-printer the gui pops up and I can change all the settings without and username password prompt.

I have my printer running in a disposable Qube and not the template. So a slightly different setup.

Odd, yes. I’m only passably comfortable with messages I get in Terminal, as I often need to look up syntax to do even regular work. Might the deprecated Gtk messages mean, that I no longer have a usable Gtk version, that will work with the Brother drivers? Or could updates have somehow changed permissions for access on my system? Just brainstorming, because I have insufficient knowledge to go from. I do all updates on my R4.3.1 debian based system as they become available. I am running the 7.1.12-1 kernel and am on Xen 4.19.5. I do have backups of personal files and also full Qubes backups available to use. If worse came to absolutely worst, I wouldn’t rule out completely reinstalling Qubes. Somewhat time consuming, but I have occasionally done it in the past. No guarantee however, that a reinstallation would solve the problem. I did run into a snag, after I deleted the keyrings folder in my personal vm. The next time I opened Vivaldi browser, there was an Authorization box for Vivaldi. But it cleared with the enter button and hasn’t come back. So the keyring did reset for Vivaldi it seems, but not for the Brother printer, if keyring is even the problem.

Danan, I just reread your last post. I missed the sudo vs non-sudo entry bit. I’ve just tried on my system, attaching the printer to the template and entering sudo system-config-printer. It worked, without demanding authorization entries. I then tried just system-config-printer and was back to the authorization rejection again. This also makes me wonder if I need to do a chown or chmod modification somewhere in my system for printer access.

You should of read my first reply 7days ago :wink: :slightly_smiling_face: .

Debian usually puts the user in the relevant groups but i am not sure why qubes is not doing that (Is it a bug?). I am reluctant to recommend changes that i am going to suggest because I am not sure of the security consequences, but I guess you could just add the user user to the lp group and lpadmin group and i think you will not then have to use sudo. hopefully somebody will clarify that point.

I did check before and have just checked again now. My username is present in the /etc/passwd file for lp and it is in the /etc/group file for both lp and lpadmin.

So when you say “My username” that sounds quite personal to you, so just out of curiosity what actually is your username?

If the answer is anything other than user then that might be the problem.

Does this help? I have tried both x and user in the username box with the same result. Results below are with the printer template set as template for my personal vm and printer connected to the personal vm.

personal vm: /etc/group → lp:x:7: /etc/passwd → lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin

template vm: /etc/group → lp:x:7: lpadmin:x:186 /etc/passwd → lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin user:x:1000:1000::/home/user:/bin/bash

So in my particular setup, if i run the following 2 commands the username passwd box never appears.

sudo usermod -a -G lp user

sudo usermod -a -G lpadmin user

the commands above add the user user to the lp and lpadmin group which from your last message they appear to be omitted.

now you have a slightly different setup to me so i am not sure if you need to run that in the template or the personal vm or both. Actually I would try just personal vm first.

I am no expert so i have no idea why qubes does not do this and if it will make your system less secure. Use at your own risk

Wonderful! Thanks ever so much Danan. Never would have gotten this on my own. I entered your two commands in my personal vm and it worked, but wouldn’t survive a reboot. I then entered the commands into my template, it then worked in my personal vm and was persistent after another reboot. So I tried my untrusted vm, without running the commands on untrusted and that worked. So in my case it looks like just running the two commands in my template did the trick. Thanks again. I was in the process of updating password lists, backing up favourites and files, etc for a complete system reinstallation. But all seems fine now.