Bug 1715900

Summary: Authentication dialog for samba printer provides no input fields
Product: [Fedora] Fedora Reporter: Jan Škrle <j.skrle>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 30CC: abokovoy, ani, anoopcs, asn, bcotton, eblake, fmuellner, gdeschner, gnome-sig, jarrpa, jstephen, lmohanty, madam, mkasik, ofourdan, rstrode, sbose, ssorce, tiagomatos, yaneti
Target Milestone: ---Flags: bcotton: fedora_prioritized_bug+
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: 2020-05-22 18:01:35 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 Jan Škrle 2019-05-31 14:56:18 UTC
Description of problem:
Authentication dialog in print job list for network printer has no inputs whatsoever

Version-Release number of selected component (if applicable):
gnome-shell-3.32.2-1.fc30.x86_64
gnome-settings-daemon-3.32.0-1.fc30.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Set up a network printer via SMB in CUPS, e.g. something like smb://printserver/queue which requires authentication
2. Try to print a document
3. The job is held for authentication. Upon opening authentication pop-up dialog in print job list it shows empty without any input fields.

Actual results:
The printout is held for authentication.

Expected results:
A popup asking for Windows username and password should be shown and the printout should be sent to the printer by using these authentication information.

Additional info:
If I change `AuthInfoRequired negotiate` => `AuthInfoRequired username,password` in `/etc/cups/printers.conf`, I am able to authenticate next print job correctly, but after that cups changes the settings back and problem repeats.

Even if dialog works correctly, it seems silly to be forced authenticate every print job. There should be an option to save credentials. I also tried to fill credentials into DeviceURI (e.g. `smb://domain\username:password@printserver/queue`), did not work any better.

My /etc/cups/printers.conf is as follows:
# Printer configuration file for CUPS v2.2.11
# Written by cupsd on 2019-05-31 16:18
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
<DefaultPrinter Seznam>
UUID urn:uuid:6513514c-33f4-322c-7a11-ac1e21beb198
AuthInfoRequired negotiate
Info Seznam
MakeModel KONICA MINOLTA C360SeriesPS(P)
DeviceURI smb://tisk/Konica
State Idle
StateTime 1559312295
ConfigTime 1553173465
Type 8401100
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</DefaultPrinter>

Comment 1 Marek Kašík 2019-06-10 15:07:16 UTC
This is an issue in samba package. It returns the "negotiate" in AuthInfoRequired. The version of samba in Fedora 29 worked so I tried to find the commit which caused this.
It is a set of related commits:

https://git.samba.org/?p=samba.git;a=commit;h=fad5e4eaeb9202c1b63c42ea09254c17c473e33a
https://git.samba.org/?p=samba.git;a=commit;h=43160184d254a57f87bb2adeba47f48d8539533a
https://git.samba.org/?p=samba.git;a=commit;h=5274b09fbaa5e45cc58f3301818d4e9f6a402845
https://git.samba.org/?p=samba.git;a=commit;h=129ae27946318a075e99c9e6d1bacf8963f72282
https://git.samba.org/?p=samba.git;a=commit;h=69d7a496d3bf52eaa10e81132bb61430863fdd8a

If I revert them in Fedora 30 then the dialog shows the fields.
I made a scratch build of samba with the commits reverted here: https://koji.fedoraproject.org/koji/taskinfo?taskID=35458274

I'm reassigning this to samba.

Comment 2 Dr Anirban Mitra 2020-01-31 16:15:43 UTC
I can not upgrade to Fedora 31 due to this bug as even upgrading samba in F29 I am unable to print through my windows computer due to this bug. 
Is it expected to be solved in Fedora 33?

Comment 4 Guenther Deschner 2020-04-08 09:19:06 UTC
Can you re-test with the latest available update for f30 (samba 4.10.14) ?

https://bodhi.fedoraproject.org/updates/FEDORA-2020-a1eacf6355

We (Andreas and me) tend to believe that the issues with smbspool are resolved in that release.

Comment 5 Jan Škrle 2020-04-17 14:06:04 UTC
(In reply to Guenther Deschner from comment #4)
> Can you re-test with the latest available update for f30 (samba 4.10.14) ?
> 
> https://bodhi.fedoraproject.org/updates/FEDORA-2020-a1eacf6355
> 
> We (Andreas and me) tend to believe that the issues with smbspool are
> resolved in that release.

I am sorry, but at the moment I am unable to try replicate the problem under same conditions as this particular samba printer is placed at my workplace. And due to covid19 quarantine I work entirely from home, where I do not have printer at all.

Comment 6 Ben Cotton 2020-04-17 17:18:47 UTC
Setting to ON_QA since a fix is released, but not confirmed. If some is able to test and verify, I will close it.

Comment 7 Dr Anirban Mitra 2020-04-29 11:37:22 UTC
As I can not go to my office due to lockdown I can not check the fix. Will report when available.

Comment 8 Ben Cotton 2020-04-30 20:10:53 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Eric Blake 2020-05-01 15:01:18 UTC
After upgrading to Fedora 32, I'm still having problems.  Browsing to:
https://localhost:631/printers/
and selecting my printer, then maintenance, print test page, I see:
processing since
Fri 01 May 2020 09:56:50 AM CDT 
"Connection failed: NT_STATUS_CONNECTION_DISCONNECTED"

I was never offered an opportunity to enter in a username or password (although my particular samba server was set up for password-less printing).  Meanwhile, Windows machines in my subnet have no problem printing to the same samba server.  I'd welcome any advice on what troubleshooting steps I can take to help you fix this.

Comment 10 Ben Cotton 2020-05-01 20:41:17 UTC
Guenther and Andreas, does the report in comment 9 seem like the same issue?

Comment 11 Guenther Deschner 2020-05-06 08:34:01 UTC
Ben, no, I don't think so it is the same issue Eric is seeing in comment #9

Comment 12 Ben Cotton 2020-05-06 18:54:25 UTC
Re-setting version and status fields based on comment 11. 

Agreed in today's Prioritized Bugs meeting that unless the original behavior can be confirmed to *not* be fixed in update FEDORA-2020-a1eacf6355, by the 20 May prioritzed bugs meeting, we will close this bug as resolved.

https://meetbot.fedoraproject.org/fedora-meeting/2020-05-06/fedora_prioritized_bugs_and_issues.2020-05-06-15.00.log.html#l-74

Eric, I encourage you to file a new bug about the behavior you reported in comment 9.

Comment 13 Ben Cotton 2020-05-22 18:01:35 UTC
Per comment #12, I am closing this bug.

Comment 14 Jan Škrle 2020-06-22 06:29:35 UTC
For me it seems to be working just fine after upgrade.

Comment 15 Guenther Deschner 2020-06-22 09:33:54 UTC
Thanks Jan, for providing the feedback!