Add samba printer authentication prompt broken

Bug #293134 reported by neur0
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
system-config-printer (Ubuntu)
New
Low
Unassigned

Bug Description

Adding a samba shared printer in Ubuntu 8.10 works if I enter the url and supply authentication information, but it never prompts me for credentials if I chose the "prompt user if authentication is required" option. It just says it failed like it can't find the shared printer.

Revision history for this message
Tim Waugh (twaugh) wrote :

Which error message do you get?

Revision history for this message
neur0 (wc3che) wrote :

After more testing, I found out that "prompt user if authentication is required" works, only the [verify] button gives me "Print Share Inaccessible" without asking me for credentials which is maybe even "working as intended" but is misleading.
If I supply the credentials and then go verify, it works fine.
I expected to be prompted for UN / Pass when I pressed Verify with "prompt user if authentication is required" checked, but instead I got "Print Share Inaccessible"
Still don't know if this is a bug, a design flaw or PEBKAC.

Revision history for this message
Tim Waugh (twaugh) wrote :

The intended behaviour is for the Verify button to present an authentication prompt.

Please run 'system-config-printer --debug' from a terminal window and get to the part where you press the Verify button and get an error dialog. What messages are shown in the terminal window?

Revision history for this message
neur0 (wc3che) wrote :

I don't get any message in the terminal window when I press Verify. Also I don't get any message in the terminal window if I supply the UN/pass and then press verify, but here's the whole log if it can help:

>>
/usr/share/system-config-printer/system-config-printer.py:197: GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated
  self.xml = gtk.glade.XML(xml, domain = domain)
Connected as user neu
refresh
Created subscription 9
<monitor.Monitor instance at 0x932796c>: printers and jobs lists provided
update
Authentication pass: 1
Authentication: password callback set
Authentication pass: 1
Authentication: password callback set
Authentication pass: 1
Authentication: password callback set
Authentication pass: 1
Authentication: password callback set
get_notifications
update
fetchDevices
Lock acquired for devices thread
Devices thread started
Connecting (devices)
Fetching devices
Closing connection (devices)
Releasing devices lock
Got devices
socket: scheme is None
queryPPDs
Lock acquired for PPDs thread
PPDs thread started
Connecting (PPDs)
Fetching PPDs
socket: scheme is None
Closing connection (PPDs)
Releasing PPDs lock
get_notifications
update
<<

I tried using it as SU but everything's the same.

Revision history for this message
chris emery (chrisemery) wrote :

I've got the same problem. The Verify button displays "Print Share Verified" when I select 'Set authentication details now'.

When I select 'Prompt user if authentication is required', the verify button displays a dialog box: 'Print Share Inaccessible'.

I ran system-config-printer --debug, and have attached the output below. Note, there was no output when I clicked the verify button, only the gui dialog indicated above.

Revision history for this message
chris emery (chrisemery) wrote :

For what it's worth, I've gotten the Verify button working by installing pysmbc (http://cyberelk.net/tim/2008/03/11/python-bindings-for-libsmbclient/). The prompt is displayed, and an 'Accessible' success message is displayed when authenticating.

However. the prompt to authenticate when a print job is submitted is still not working. All print items get added to the queue with a 'Held for Authentication' state.

When I click the 'Verify' button (which seems to use different auth prompt code), the auth loop goes through several passes. If I understand the code correctly, the third iteration is the what prompts for credentials (vs. the first 2 that try unauthenticated and 'guest').

However, the normal auth loop (when printing) seems to keep repeating pass 0 (see attached debug output on my earlier post). I may be misunderstanding the code, but this might be a clue to where it's failing.

Thanks

Revision history for this message
Tim Waugh (twaugh) wrote :

If you right-click on the printer icon in the system tray (or just kill the 'system-config-printer-applet' process) and then run:
  system-config-printer-applet --debug

It would be instructive to see the debugging output when you try to authenticate a job. Print a job, wait for the authentication notification to appear, click 'Authenticate', and then enter your details and click OK.

Revision history for this message
chris emery (chrisemery) wrote :

Essentially the main issue for me has been that I am not prompted to authenticate my jobs, which causes them to sit in the queue with 'Held for authentication' as the status.

Interestingly enough, one of these jobs was still sitting in the queue when I followed the steps you suggested (kill applet, run system-config-printer-applet --debug) and to my surprise the prompt was displayed. I entered my credentials and the print job went through.

Unfortunately, I did not save think to save the debug output, and have since been unable to get the authentication dialog to re-appear. I've followed the steps above again, beginning with an empty queue. Once the applet is running in debug, I have gone into OpenOffice and selected print. The job is added in my print queue, but the applet does not appear, and no authentication dialog is presented. I've attached the debug output from this sequence of events (as of the final line attached, the job is still in the queue with a state of 'Held for authentication'.

Revision history for this message
Tim Waugh (twaugh) wrote :

OK, I think this may have been fixed recently upstream (in 1.0.10). Some job events would get missed, and that seems to be what's happening here.

Revision history for this message
chris emery (chrisemery) wrote :

We came to much the same conclusion in our testing. We actually got it somewhat working by setting my_jobs = False. This experiment was based on the idea that jobs were being missed due to them being set to user 'root' rather than my logged in user.

On a related note, I tried to download http://cyberelk.net/tim/data/system-config-printer/1.0.x/system-config-printer-1.0.11.tar.bz2 but it returned a 403. I will try the 1.0.10 release and let you know if that works for me.

Revision history for this message
Tim Waugh (twaugh) wrote :

No, they are missed because of a coding error.

The reason 1.0.11 is not downloadable is that there was a false start during the release process, and I am re-spinning it.

Revision history for this message
Steve Karg (steve-karg) wrote :

This is broken in Jaunty 9.04 which is using
Source: system-config-printer
Version: 1.1.3+git20090218-0ubuntu19.2

I haven't tried the latest version from http://cyberelk.net/tim/data/system-config-printer/1.1/ - which appears to be 1.1.13 at this time.

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.