Credentials required in order to print

Today I reinstalled Rocky Linux 9.4 after making a “tar” mistake last week-end. I “restored” some of my old CentOS configuration and thus caused dnf to fail. Today has gone much better, but, alas, my attempt to install cups and share my printer is now running into: “Credentials required in order to print” when attempting to print from another PC. A test page from the cups web-page works fine.

I did a fair amount of searching but found no obvious answers. This is a small home-based network where I happy to allow anyone connected to the 10.x.x.x network to use the printer without requiring a login.

This has now been resolved. It appears I failed to set the printer for sharing when I created it via the cups web-ui. Unfortunately none of the references, including bug reports at Red Hat, mentioned this.

I resolved the problem by setting up the printer at the command line.

[root@myhost ~]# lpadmin -p HP_LaserJet_P2035 -D “HP LaserJet P2035” -E -m drv:///hp/hpcups.drv/hp-laserjet_p2035-pcl3.ppd -v hp:/usb/HP_LaserJet_P2035?serial=RZ5WMTH
lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS.
[root@myhost ~]# lpadmin -d HP_LaserJet_P2035
[root@myhost ~]# echo $(uname -n) $(date) | lp
request id is HP_LaserJet_P2035-4 (0 file(s))
[root@myhost ~]# cupsctl --share-printers
[root@myhost ~]# lpadmin -p HP_LaserJet_P2035 -o printer-is-shared=true

After this, my wife’s PC (Ubuntu) was able to print. I’d been messing around with the printer on my PC (Pop!_OS) so I had to delete and re-add via the normal add-printer dialog.

fyi: The lpadmin -m and -v values were determined from lpinfo -m and -v output as suggested on the cups web-ui. Several sources suggested the worrisome message about “deprecated” can be ignored for now.

2 Likes