You are not logged in.

#1 2021-02-22 18:12:24

ElSigma
Member
Registered: 2021-02-22
Posts: 2

Cups not asking for credentials to network printer

Greetings,

I have a network printer set up with a Raspberry Pi behind a reverse proxy with PAM authentication.
I was able to add this network printer in Windows using https (https://domain.com/printers/printer_name) and it prompted me for credentials as expected, I was able to print a test page without issues. Now I'm trying to set up the printer in my Arch machine and I can't find any way for the system to prompt me for credentials when adding the printer...

I installed the cups package and added the printer with the same URL stated above. Now, when trying to print a test page, I get "Held for authentication" in CUPS and "Backend returned status 2 (authentication required)" in /var/log/cups/error_log.

How can I add these credentials or at least make CUPS prompt me for them?

Thank you!

Offline

#2 2021-02-23 13:39:58

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,894

Re: Cups not asking for credentials to network printer

Normally credentials are appended to the URI, but ipp protoco[1]l doesn't seem to support that[2]


Is the archlinux machine / user allowed to connect to the raspberry pi through the reverse proxy ?

If yes, how did you configure the access to the printer on the raspberry pi ?


[1] on windows http / https appears to be used instead of ipp
[2] https://www.cups.org/doc/network.html


Edited to correct typo / lay-out

Last edited by Lone_Wolf (2021-02-24 11:43:24)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-02-23 17:21:56

ElSigma
Member
Registered: 2021-02-22
Posts: 2

Re: Cups not asking for credentials to network printer

Thank you for your contribution, Lone_Wolf.

It's a simple HTTP Apache reverse proxy, I actually solved the problem by appending the credentials to DeviceURI in /etc/cups/printers.conf:

    DeviceURI https://username:password@domain.com/printers/printer_name

It works perfecly now. I guess the appended credentials work since I'm using the HTTPS protocol instead of IPP.

Offline

#4 2021-02-24 11:46:09

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 8,894

Re: Cups not asking for credentials to network printer

Changing the DeviceURI in printers.conf directly was going to be my next suggestion.

Glad you figured it out , accessing network devices from different OSes can be very tricky.

Last edited by Lone_Wolf (2021-02-24 11:46:40)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB