printer dialog forgets authentication

Bug #475686 reported by Dominic Lachowicz
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gtk+3.0 (Ubuntu)
Confirmed
Undecided
Unassigned
system-config-printer (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I configured a network printer over SMB. I passed in my username/password and checked the "save login credentials" button. Every subsequent time I print, it asks me for my credentials again.

I'm on Karmic. This seems to be a regression from Hardy.

Revision history for this message
SneakyWho_am_i (sneakywho-am-i) wrote :
Download full text (4.2 KiB)

sneaky@lucid-laptop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS"

The win box is windows 2000 Professional.

I'm on Lucid seeing this. Can't try a clean install today but...

In short, an easy workaround. Just delete the printer and replace it. Make sure that you enter the username and password correctly first time. That is the only chance you get.

This bug has something to do with:
- entering the wrong username and password on a samba shared printer adds a line "AuthInfoRequired username,password" to the printer configuration file.
- No matter what username and password are set, programs will prompt every time for the username and password.
- Removing this line (with cups stopped) does not fix the problem; hence there is some other thing wrong here.

NOTE: This file can contain passwords. Be aware of what you paste.

sneaky@lucid-laptop:~$ sudo cat /etc/cups/printers.conf
# Printer configuration file for CUPS v1.4.3
# Written by cupsd
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<DefaultPrinter HP-LaserJet-1200>
AuthInfoRequired username,password
Info HP LaserJet 1200
Location windows test box
MakeModel HP LaserJet 1200 Foomatic/pxlmono (recommended)
DeviceURI smb://user:password@winbox/lj1200
State Idle
StateTime 1281657261
Type 8400916
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 100 foomatic-rip
Filter application/vnd.cups-pdf 0 foomatic-rip
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>

To reproduce (not sure about deps):
- Install Lucid
- sudo /etc/init.d/cups start # for some reason it probably won't start automatically out of the box
- System->Administration->Printing
- Click "Add"
- Click "+" to expand "Network Printer"
- Click "Windows Printer Via SAMBA"
- Type the smb path to the appropriate printer, as indicated in the dialog. Also add your username and password.
- Click "Verify"
- Read "The Print Share Is Accessible". Click "OK".
- Click "Forward"
- Pick "HP" (or your printer manufacturer) under "Select printer from database", then click "Forward"
- Pick "LaserJet 1200" or "LaserJet 3" (or whatever). The default (recommended) option in the right pane is good.
- Click "Forward"
- Click "Apply"
- Print as many test pages as you like, it will not ask for a password for test pages!
- lpr will not require a password!
- Double click the new printer in "Printing - localhost" to open its properties page.
- Next to "Device URI" click "Change" and wait (and wait... and wait)
- NOTICE the "Authentication" options in this screen are mostly disabled, it says "Prompt User for authentication if required". That's not what we set earlier!

... So let's enter our password and whatnot, and try looking again. OK, this screen is basically not displaying the entered credentials from before, but I think they're still there.

And we can still print.

- Go back to the "Printing - localhost" window, open the properties page for the printer, click to change the Device URI and this time enter INCORRECT credentials. Click "Apply", "OK", or whatever e...

Read more...

Revision history for this message
SneakyWho_am_i (sneakywho-am-i) wrote :

Affected by this bug?
Here's a weird effect:
- set (and verify) the correct username and password in the printers folder
- verify that your app (eg evince / document viewer) is still prompting for the password EVERY TIME
- just hit enter when it asks for a password.

If I don't type anything, the window's form says that I will send my username only (and a blank password) but wireshark shows that it is instead sending the correct username and password (which I entered into the printers folder, but which is hidden).

So the user/pass forms are all kind of broken, in my opinion. If this last particular one wouldn't come up every time it wouldn't be so unnerving.
But at least we can still print, which is the main thing.

I noticed that it ignored the credentials when I saw a user typing in a password but leaving the username field wrong... And caught it on wireshark.

The display filter in wireshark is:

smb.cmd == 0x73

Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

Hello
Is this problem present with the latest updated Karmic's or Lucid's packages?
Thanks in advance
Fabio

Changed in ubuntu:
status: New → Incomplete
Revision history for this message
bijwaard (bijwaard) wrote :

This error is still there in Ubuntu 10.04.1 LTS, I'm also affected

affects: ubuntu → cups (Ubuntu)
Changed in cups (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
JayBofMA (jayburrill) wrote :

And this bug is still present in Natty 11.04 :-(

Revision history for this message
Ned Hedrick (nedhedrick) wrote :

I have the same experience printing from 13.04 BETA to a Windows printer...

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Note that CUPS does not hold user credentials when a user types them in in a print dialog. The problem is in the dialog or in system-config-printer.

affects: cups (Ubuntu) → system-config-printer (Ubuntu)
Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.