Created attachment 1430234 [details]
output of journalctl -e -u cups
Description of problem:
Ever since upgrading to fedora 28 I am unable to print on a smb share.
Version-Release number of selected component (if applicable):
Upgrade from fedora 27; try to print something on a smb share.
Cups returns an error and the printer gets off line.
Steps to Reproduce:
1. try to print a file
The printer gets off line
The file is printed
Our set-up uses a samba share to access a centralized print system (uniflow).
If I send a file directly using smbspool
smbspool smb://USER:PASSWORD@domain/server/printer 1 1 0 1 1 filename.pdf
everything seems to work properly.
I have observed that smbspool in fedora 28 expects 6 or 7 parameters (7 in case we specify I file), while smbspool in centos 7.4.1708 expects either 5 or 6 parameters. In particular, if smbspool in fedora is given just 6 parameters, then it expects the file to be printed from STDIN; on the other hand smbspool in centos has the filename as 6th parameter.
I include the output of journalctl after setting logging with
thank you for reporting this issue! AFAIK /usr/lib/cups/smb is symlink to /usr/libexec/samba/cups_backend_smb, but it isn't around anymore... Andreas, maybe you know more?
It seems like samba problem to me right now, because it is connected to smb backend, which is provided by samba.
Actually, the smb backend is installed by samba-client.
It is a symlink to
which is in turn a symlink to
which links to
depending on whether
This should not make a difference in my case as I do not use krb authentication and (in this case) smbspool_krb5_wrapper should just exec smbspool.
On the other hand, I suspect that the defaults of smbspool have changed and that is the reason of the problem.
Is there a cups config file to determine what parameters are being passed to a backend and/or change them?
[I have not been able to find it, but I did not go and check the source]
I think there's something odd in the code here, causing the help screen: https://github.com/samba-team/samba/blob/8c833470fc52332c62220ec9cc38c8a4fd7721f1/source3/client/smbspool.c#L120
I get the same error on my side. Adding an empty DEVICE_URI argument to smbspool seems to make printing work again. This also makes argv resolve to the print user's name, as expected in smb_connect() (see line 270 and 524.)
*** Bug 1574761 has been marked as a duplicate of this bug. ***
I have the exact same problem.
CUPs fails to print to a samba printer, with the cups log showing a "USAGE" report...
Usage: smbspool.orig [DEVICE_URI] job-id user title copies options [file]
The DEVICE_URI environment variable can also contain the
After placing a wrapper around the "smbspool" command which the CUPs "/usr/lib/cups/backend/smb" command eventually reached via a series of symbolic links, extracting the call environment and playing around, I learned the following, using simplified test cases...
A command like...
smbspool "$SMB_PRINTER_URI" 7 root test 1 '' <test_file.ps
works perfectly fine!
NOTE: SMB_PRINTER_URL is the correct smb://... URI, not published as it includes machines, username, and password identifiers)
However if I run the smpspool command like this...
DEVICE_URL="$SMB_PRINTER_URI" smbspool 7 root test 1 '' <test_file.ps
It will NOT work and return the "USAGE" message seen in the CUP's logs.
This latter form is the form that CUPs uses and according to both the "smbspool" manpage, and the acual USAGE error report, should be an acceptable use case. However it appears that is no longer the case in Fedora 28 release.
I do not it did work fine in Fedora 27
IN SUMMERY: Samba "smbspool" command changed without any indication in manpages or the usage error report.
This appears to be the cause of the problem.
Please note: BOTH methods have a LOT to be desired when usernames and passwords are involved in terms of security! But that is a different matter entirely!
For myself I have worked around the problem using a 'wrapper' script for "smbspool" to switch from one usage style to the other.
Specifically I moved "/bin/smbspool" to "/bin/smbspool.orig"
and added this script for "/bin/smbspool"
exec smbspool.orig "$DEVICE_URI" "$@"
Anthony Thyssen -- UNIX Administrator for 30+ years
I've already fixed it. Will have a backport probably by tomorrow.
samba-4.8.1-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-48836bc2b8
I can confirm that printing to the smb share now works for me after updating to the fixed version.
samba-4.8.1-1.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-48836bc2b8
samba-4.8.1-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.