smb printing fails

Bug #1849859 reported by Mika on 2019-10-25
68
This bug affects 18 people
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Undecided
Till Kamppeter
samba (Ubuntu)
Undecided
Unassigned
system-config-printer (Ubuntu)
Undecided
Unassigned

Bug Description

when I connect to smb server (nas) permanently appears

"Error while getting peer-to-peer dbus connection: Operation was cancelled"

The printer at this NAS doesn't work too.

"held for authentication KeyError: 'auth-info-required'"

The same printer at usb port works fine.

Ubuntu development version 20.04
system-config-printer version 1.5.11-4ubuntu1
smbclient version 2:4.10.7+dfsg-0ubuntu3

Mika (70mike) wrote :
Mika (70mike) wrote :

Attachment

Mika (70mike) wrote :

Attachment

affects: budgie-desktop (Ubuntu) → samba (Ubuntu)
Mika (70mike) on 2019-10-25
description: updated

Hi Mika,
Thank you for taking the time to report this bug and helping to make Ubuntu better.

The bug doesn't hold a lot of info to help with.
All I can say at this point is that it works for me (20.04 container to NAS via samba) and that a search for your error message didn't yield too many results that seemed helpful. :-/

Since it seems more likely to me that this is a local configuration problem, rather than a bug in Ubuntu, I'm marking this bug as Incomplete.

If indeed this is a local configuration problem, you can find pointers to get help for this sort of problem here: http://www.ubuntu.com/support/community

Or if you believe that this is really a bug, then you may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem, explain why you believe this is a bug in Ubuntu rather than a problem specific to your system, and then change the bug status back to New.

Changed in samba (Ubuntu):
status: New → Incomplete
Mika (70mike) wrote :

Danke für die Antwort, leider fällt es mir schwer, auf Englisch zu antworten, und erst recht einen Bug zu beschreiben.

Ich glaube dennoch, dass es sich um einen solchen handelt, weil ich die gleiche Druckerkonfiguration wie unter 18.04 durchgeführt habe, dort aber diese Probleme nicht hatte.
Mehr Informationen kann ich zum Problem leider auch nicht beitragen, das das System mir nicht mehr Informationen gibt.

Das NAS ist ein Netzwerkserver, über diesen verbinde ich mich ganz normal über PCManFM-QT, eine Konfiguation ist hier nicht nötig und möglich, er verbindet sich auch, ich muss aber nach jedem Klick auf dem NAS die obige erste Fehlermeldung wegklicken.

Zur zweiten Meldung: Der Drucker hängt am NAS, auf dem NAS läuft also ein Printserver.
Die Verbindung erfolgt ganz normal über smb://DLINK-1234xx/lp
In der Meldung wird nun eine Authentifizierung gefordert, die garnicht eingerichtet ist und die Terminalausgabe besagt wohl, dass der Fehler in der Datei /usr/share/system-config-printer/jobviewer.py liegen könnte, zumindest wird hier auf Fehler in der Datei hingewiesen.

Da es sich um eine Entwicklerversion von Ubuntu handelt, dachte ich, meine Meldung wäre von Interesse.

Changed in samba (Ubuntu):
status: Incomplete → New
Mika (70mike) wrote :

Besagte Datei jobviewer.py ist laut Dateiinfo ein Python-Script, installiert ist aber Python3.
Könnte dies zu dem Fehler führen?

Mika (70mike) wrote :

Noch als Ergänzung:

Das System ist ein Ubuntu Server 20.04 (Minimalinstallation) mit den nachinstallierten Paketen lxqt-core kde-window-manager intel-microcode sddm plasma-nm qterminal cups

Hiho,
keine Angst "von Interesse" ist erst einmal jede Meldung. Ich selbst bin nur nicht so fit mit dem Druckteil von Samba und Co.

I think we should add cups and system-config-printer bug tasks as I think this isn't really a samba things.

Ich Fasse mal zusammen:
- printer setup that worked with 18.04, but fails with 20.04
- no authentication configured on the printer side
- authentication pop up then fails missing said authentication (see trace in terminal.bmp)
- Maybe related to bug 1849859 or similar

Changed in cups (Ubuntu):
assignee: nobody → Till Kamppeter (till-kamppeter)

@Till - does any of this look familiar from a printing POV?

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cups (Ubuntu):
status: New → Confirmed
Changed in samba (Ubuntu):
status: New → Confirmed
Changed in system-config-printer (Ubuntu):
status: New → Confirmed

For me it looks like that something changed in Samba. Printing on such a server is done via the /usr/lib/cups/backend/smb CUPS backend which is part of the smbclient package.

Is there no way to access the printer on the NAS via IPP?

daponz (daponz) wrote :

Same problem here, cannot print using shared printer on the network. It says waiting for authentication. That s annoying.

Is there a workaround? Would installing a prior version of smbclient do the trick?

Can this perhaps have to do with this bug in Fedora 30: https://bugzilla.redhat.com/show_bug.cgi?id=1706090 ?

See also bug 1853242.

Mika (70mike) wrote :

In this days cups-filters, libcupsfilters1, cups-filters-core-driver, cups-browsed and libfontembed1 was upgraded.
Since then nothing works anymore, printing per USB don't work anymore too.

Error message: Filter failed

@ Till Kamppeter
The described bug in Fedora 30 seems to be the same.

@daponz
Do you use Ubuntu 20.04 too?
Installing a prior version of smb client or cups is not possible, then you have to jump to an prior Ubuntu.
In 18.04 it works fine.

There is still plenty of time until April, I hope, this bug will be solved till then.

daponz (daponz) wrote :

Hi,

Nope I'm running 19.10. This bug exists in current version of ubuntu.

If it is the same as fedora bug mentioned by till then the upstream samba issue is [1]

There are backport efforts on that still going on.
An example for 4.10 is in [2] and Uppstream this is merged in 4.11.

So the upcoming merge for 4.11 into Ubuntu 20.04 should fix it there and SRUs can afterwards be considered. I'll be pinging on the merge to mark this bug resolved as soon as 4.11 is in.

[1]: https://bugzilla.samba.org/show_bug.cgi?id=13939
[2]: https://src.fedoraproject.org/rpms/samba/blob/cba8dea822d305d7e30c59b50ae4af540f8950d3/f/samba-4.10.6-smbspool.patch

Andreas Hasenack (ahasenack) wrote :

https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1853743 might be a dupe. Will confirm once the patch is applied

Andreas Hasenack (ahasenack) wrote :

I believe I reproduced the problem in eoan. Next, test some patches.

Andreas Hasenack (ahasenack) wrote :

Hm, scratch that, it also didn't work with bionic, so I must be doing something wrong.

I'm gonna need reproduction steps I'm afraid.

Andreas Hasenack (ahasenack) wrote :

Ok, I think I got something. It's working in bionic, and in eoan I got:

root@nsnx:~# /usr/lib/cups/backend/smb smb://10.10.1.6/ds216laser 34 root "Test Page" 1 "job-uuid=urn:uuid:efa8b6df-0724-3252-4657-11e6ac474646 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1574951400 time-at-processing=1574952123" .bashrc
kerberos_ccache_is_valid: Failed to get default principal from ccache: FILE:/tmp/krb5cc_0
DEBUG: This backend requires credentials!
DEBUG: get_exit_code(nt_status=NT_STATUS_ACCESS_DENIED [c0000022])
ATTR: auth-info-required=none
DEBUG: Unable to connect to CIFS host: NT_STATUS_ACCESS_DENIEDroot@nsnx:~#

That's something I can work with.

Andreas Hasenack (ahasenack) wrote :

I looked at the existing bug reports, but I don't think any of the patches fix the problem. Furthermore, I tried debian's 4.11.1 samba package, and got the same error.

I now emailed samba-technical@ with a question:
https://lists.samba.org/archive/samba-technical/2019-November/134602.html

Mika (70mike) wrote :

Yesterday were a lot of updates in samba package and now

all is out of work, nothing goes on, nix geht mehr.

Connection to the server fails completely, that ist very bad, more then the printer bug.

Mika (70mike) wrote :

And this:

Mika (70mike) wrote :

Or should I open a new bug report?
This new bug is very annoying.

Andreas Hasenack (ahasenack) wrote :

A new bug please, I'm focusing on the printing case for this one.

Andreas Hasenack (ahasenack) wrote :

Upstream work which might help, although it's about using the smbspool krb5 wrapper, it also has changes to the smbspool binary:

https://gitlab.com/samba-team/samba/merge_requests/961

summary: - error when connecting to smb server
+ smb printing fails
Mika (70mike) wrote :

I have now reported a new bug:

https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1855758

But anyway I think, it belongs here.

@ Andreas Hasenbeck: Ich verstehe deinen letzten Kommentar nicht, mein Englisch ist aber auch nicht so perfekt. Schreibst du da, es gibt eine Lösung?

Andreas Hasenack (ahasenack) wrote :

Für das druckproblem, ja

@Andreas Hasenack, eu também falo Alemão, se tiver um problema com CUPS, cups-filters, ... :)

Mika (70mike) wrote :

Is there a patch to be expected or do I have to do it myself?

Where should this ominous file smbspool.c be?

"find / smbspool.c" cannot find it.

Andreas Hasenack (ahasenack) wrote :

A patch is expected. I just added the info to the bug to show what is going on.

Xu Xiaopeng (xxp2019) wrote :

problem reproduced on my Ubuntu 19.10

Mika (70mike) wrote :

Despite really a lot of updates (samba, cups) the "held for authentication" problem persists!

I hope, it's comming soon a solution. This is very disappointing.

Andreas Hasenack (ahasenack) wrote :

Upstream committed more changes in this area, I have to check out what the latest patches look like. Upstream's intention I think was to switch wrappers to the krb5 one, which would then call smbspool if no krb5 auth is involved.

Mario (mario-gleirscher) wrote :

My machine also seems to be affected by this bug on Ubuntu 19.10. I filed some information here if it is of any help:
https://askubuntu.com/questions/1205208/how-to-fix-failing-connection-to-samba-print-share-ubuntu-19-10/1205397#1205397

Martino Ronchi (bellanano) wrote :

I can confirm this bug is present on UBUNTU 19.10 with latest samba packages installed. Printer is working with virtual window 10 machine installed on it.

Diego (snakuzzo) wrote :

Hi everyone.
Any news about this bug?
I'm trying just now...but it asks me for credentials with no way to insert username and password

Andreas Hasenack (ahasenack) wrote :

I'm updating focal to 4.11.5 (hoping debian will update to 4.11.6 soon, and will check again how printing is working in this release. If it still fails, I'll grab the patches I saw being discussed upstream and apply them, and then I will have something I can start preparing as an SRU.

Diego (snakuzzo) wrote :

Thank you...It works

This workaround don't work for my.
The /etc/cups/printers.conf file is erased and automoatically rewiriter
when the computer is initiated anf I find in this file the line
"AuthInfoRequired none" instead of "AuthInfoRequired username,password"
after I edited the file.
Greetings

El lun., 17 feb. 2020 a las 9:35, Diego (<email address hidden>)
escribió:

> Thank you...It works
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1853743).
> https://bugs.launchpad.net/bugs/1849859
>
> Title:
> smb printing fails
>
> Status in cups package in Ubuntu:
> Confirmed
> Status in samba package in Ubuntu:
> Confirmed
> Status in system-config-printer package in Ubuntu:
> Confirmed
>
> Bug description:
> when I connect to smb server (nas) permanently appears
>
> "Error while getting peer-to-peer dbus connection: Operation was
> cancelled"
>
> The printer at this NAS doesn't work too.
>
> "held for authentication KeyError: 'auth-info-required'"
>
> The same printer at usb port works fine.
>
> Ubuntu development version 20.04
> system-config-printer version 1.5.11-4ubuntu1
> smbclient version 2:4.10.7+dfsg-0ubuntu3
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/cups/+bug/1849859/+subscriptions
>

Diego (snakuzzo) wrote :

Right! I have to try after reboot

Do not edit /etc/cups/printers.conf while cupsd is running, as cupsd is modifying it. So first stop cupsd:

sudo systemctl stop cupsd

then edit the file and after that start cupsd again:

sudo systemctl start cupsd

Note that you only can edit the properties of permanent print queues. Queues which get temporarily created by CUPS or cups-browsed will loose the changes once they get removed and re-created.

Diego (snakuzzo) wrote :

It's correct. You need to stop, modify and start.
If you modify the file while cupsd is running on restart you lose the changes

Diego (snakuzzo) wrote :

Tried just now. After reboot "AuthInfoRequired username,password" still there

simon (simon-pithers) wrote :

thanks @jan.dolezal that worked for me.

for others, in my /etc/cups/printer.conf:

these two were key to getting printing working:

AuthInfoRequired username,password
DeviceURI smb://<your username>:<our password>@<your cups device uri>

in Printers > Additional Printer Settings > <your cups printer> / properties, I also set the DEVICE URI (a windows printer via Samba) but DID NOT add authentication: so just: <your cups device uri>

Mario (mario-gleirscher) wrote :

@jan.dolezal The solution worked for me as well. However, the printer credentials dialogue in 19.10 doesn't show me a "password remember" checkbox so that I have to re-enter my credentials every time I want to print something.

Mika (70mike) wrote :

This is not the best solution!
I hope that will come as soon as possible a patch!

That can not be that hard, can it???

Mika (70mike) wrote :

... and I also know this workaround and it won't work if no password is set up!

Hugo (hugofernandez) wrote :

Hello, in Ubuntu 20.04 Daily Builds, the same. I had to apply "AuthInfoRequired username,password" workarround with samba shared printers.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.5.12-0ubuntu1

---------------
system-config-printer (1.5.12-0ubuntu1) focal; urgency=medium

  * New upstream release
    - The most important change is about samba printers - the workgroup is
      now required in device URI and samba authentication works only when an
      user sets username and password during print queue creation for now
      (LP: #1849859).
  * Removed 0003-Use-ValueError-instead-of-ImportError-to-catch-excep.patch,
    0004-Fix-constructing-the-auth-dialog.patch,
    0005-Require-proper-version-of-GDK-and-GTK-in-scp-dbus-se.patch,
    0006-Set-programe-name-for-scp-dbus-service-as-well.patch,
    40_temporary-fix-for-error-pop-up-window-for-ipp-2.x-attributes.patch,
    define-classes-for-Secret-only-when-libsecret-is-installe.patch:
    Included upstream.
  * Refreshed 03_install_layout.patch
  * 40-udev-configure-printer-add-checks-for-null.patch,
    43-fix-abrt-in-udev-configure-printer.patch: Fixed crashers in
    udev-configure-printer (Upstream issue #161).

 -- Till Kamppeter <email address hidden> Mon, 24 Feb 2020 22:15:11 +0100

Changed in system-config-printer (Ubuntu):
status: Confirmed → Fix Released
Bruce Douglas (brucedop) wrote :

This bug seems to still be active in Ubuntu 20.4
The "AuthInfoRequired username,password" workarround did NOT work on my system, as when I restarted cups, it rewrote the printers.conf file without the password and user.

However what did work for me was adding the printer and adding my credentials at the same time in the SMB printer box! The format that worked was username:password@host_computer/printername. In the dialog, it deletes the username and password on the smb: line but adds them in the password and username boxes and this time writes them in the file.

This seems very strange to me but it works for me!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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