Need to enter password for lp and lpq several times

Andreas Ehn ehn+cups at kth.se
Thu Dec 2 16:25:13 PST 2004


Hi,

Replying to self with some clarifications. I hope someone has a clue
about what's going on here, because I'm lost. Thanks in advance!

Andreas Ehn wrote:

> I'm using CUPS (from the Debian package cupsys-1.1.20final+rc1-10) in
> Debian Sarge on i386 and have a problem using any functions that
> require authentication.
>
> If I want to print a document using lp, I have to enter my password
> three times before it is accepted. If I want to query the status of
> the printer queue using lpq, I have to enter the password five
> (usually) or four (rarely) times.

Now it sees to be four times for lpq. This is my setup: yavin running
CUPS on Debian Sarge (testing), acting as server, and alderaan running
the CUPS clients on Debian Sid (unstable). Also, new in the setup, is
muu, an Apple PowerBook running Mac OS X, which works better (more on
this later).

When I run lpq on alderaan (the Linux box), I need to type my password
four times before I see the printer queue. This is what appears in
/var/log/cups/access_log on the server (yavin):

alderaan - - [03/Dec/2004:00:41:58 +0100] "POST / HTTP/1.1" 401 0

Ok, at first the client tries to do something, but is not authorized
(401). This is normal, I guess. Then it asks for the password.

alderaan - ehn [03/Dec/2004:00:42:00 +0100] "POST / HTTP/1.1" 200 137

Now it succeeds (200).

alderaan - - [03/Dec/2004:00:42:00 +0100] "POST / HTTP/1.1" 401 0

But for some reason, it does something new, and is not authorized. This
goes on for four times.

alderaan - ehn [03/Dec/2004:00:42:03 +0100] "POST / HTTP/1.1" 200 137
alderaan - - [03/Dec/2004:00:42:03 +0100] "POST / HTTP/1.1" 401 0
alderaan - ehn [03/Dec/2004:00:42:06 +0100] "POST / HTTP/1.1" 200 77
alderaan - - [03/Dec/2004:00:42:06 +0100] "POST / HTTP/1.1" 401 0
alderaan - ehn [03/Dec/2004:00:42:08 +0100] "POST / HTTP/1.1" 200 126
alderaan - ehn [03/Dec/2004:00:42:08 +0100] "POST / HTTP/1.1" 200 126

Finally the request succeeds, and the client is happy and displays the
information about the queue.

On the Mac OS X box (muu), however, the user running lpq only needs to
enter her password once. This is what appears in the log:

muu - - [03/Dec/2004:01:19:53 +0100] "POST / HTTP/1.1" 401 0
muu - - [03/Dec/2004:01:19:54 +0100] "POST / HTTP/1.1" 401 0
muu - - [03/Dec/2004:01:19:54 +0100] "POST / HTTP/1.1" 401 0

Apparently, first lpq does something unauthorized three times. Then it
asks for the password (only once!).

muu - mimi [03/Dec/2004:01:19:59 +0100] "POST / HTTP/1.1" 200 135
muu - mimi [03/Dec/2004:01:20:00 +0100] "POST / HTTP/1.1" 200 135
muu - mimi [03/Dec/2004:01:20:00 +0100] "POST / HTTP/1.1" 200 75
muu - mimi [03/Dec/2004:01:20:01 +0100] "POST / HTTP/1.1" 200 124
muu - mimi [03/Dec/2004:01:20:02 +0100] "POST / HTTP/1.1" 200 124

Then it works. The queue is listed. I don't know why it sends four
requests, but all of them succeed.

Any clues? Is it the server or the Linux client setup that's borked?

Best regards,
Andreas





More information about the cups mailing list