Bug 1728452

Summary: Authentication problem in SMB printing
Product: [Fedora] Fedora Reporter: Stephen So <steve8988>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 30CC: twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-18 13:52:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen So 2019-07-10 02:13:36 UTC
Description of problem:

When trying to print to an SMB printer, the authentication details (username, password) are not being passed through, so the print job sits in the printer queue waiting for authentication

Version-Release number of selected component (if applicable):

cups-2.2.11-3.fc30.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Print a PDF 
2. Check the printer queue (from system-config-printer)
3.

Actual results:

The print job stuck in the print queue with status "Held for authentication".  The printer state starts off as "Processing" and then says "Idle - Filter failed"

Expected results:

The print job should have printed.

Additional info:

The username and password for the SMB printer was entered when setting up in system-config-printer.  This appears in printers.conf as DeviceURI smb://user:password.blah

However, I noticed that there is at the top:  

AuthInfoRequired none

If I stop the cups daemon, change this line to:

AuthInfoRequired username,password

and restart the daemon, the print job still go to the print queue waiting for authentication.  But now, if I right-click to authenticate, it now allows me to enter the username/password and the print job gets printed.

This is not ideal because each time the cups daemon restarts, it puts the AuthInfoRequired none again.  Also it is cumbersome to have to authenticate each print job.

Comment 1 Zdenek Dohnal 2019-07-12 05:30:43 UTC
Hi Stephen,

thank you for reporting the issue! Would you mind trying to set up smb printer by CUPS web ui on localhost:631, so that we can leave out possible problem in system-config-printer. Plus please provide cups logs as it is instructed in https://fedoraproject.org/wiki/How_to_debug_printing_problems#How_to_get_and_attach_logs_for_bug_report when you add the printer and when you try to print (3 different log files).

Thank you!

Comment 2 Stephen So 2019-08-01 00:17:11 UTC
Sorry, it's been a bit busy lately so when I find a chance, I will provided the request info.

Out of interest, the same issue has been reported in this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1700791

Comment 3 Zdenek Dohnal 2019-08-01 07:47:10 UTC
Stephen,

would you mind trying to set up the printer by lpadmin command too? You can find if your printer model has a support in Linux at http://www.openprinting.org/printers , then list your current installed drivers by 'lpinfo -l -m' and use the value of 'name' in lpadmin command. Or just use -o raw.

Like (you can see if ):

$ sudo lpadmin -p <print_queue_name> -v smb://<username>:<password>@<hostname>/<print_queue_name> -m <your_model> -o auth-info-required=username,password -E 

and see if you need to authenticate after that.

Comment 4 Zdenek Dohnal 2019-09-18 13:52:20 UTC

*** This bug has been marked as a duplicate of bug 1743756 ***

Comment 5 Zdenek Dohnal 2019-10-03 11:53:58 UTC
It seems samba backend now accepts this scheme when you want to authenticate:

smb://<WORKGROUP>/<username>:<password>@<hostname_or_ip>/<printer_samba_share>

system-config-printer is now corrected to indicate the new scheme and use it.

Comment 6 Stephen So 2019-12-04 03:54:32 UTC
It seems the issue has been fixed with the latest updates (of samba?).