[cups] (/usr/lib64/cups/backend/smb) stopped with status 1

YuGiOhJCJ Mailing-List yugiohjcj-mailinglist at laposte.net
Tue Feb 6 04:47:20 PST 2018


OK so now I am able to print with Samba with both "smbclient" and "smbspool" but I am still not able to print with CUPS.

Here is how to print with "smbclient":
$ smbclient //MyHiddenPC/MyHiddenShare -WMyHiddenDomain -c 'print my-hidden-file.pdf'.

Here is how to print with "smbspool":
$ export DEVICE_URI=smb://yugiohjcj:MyHiddenPassword@MyHiddenDomain/MyHiddenPC/MyHiddenShare
$ smbspool 1 1 Xerox-WorkCentre-5325-10 1 1 my-hidden-file.pdf
DEBUG: Connected with username/password...

But with CUPS it does not work.

That's what I am doing:
- I go to https://localhost:631/
- I go to "Printers"
- I delete all printers
- I go to "Administration"
- I press the "Add Printer" button
- I enter my root username and password
- I select the "Windows Printer via SAMBA" option
- I press the "Continue" button
- I type this URI in the "Connection:" field: smb://yugiohjcj:MyHiddenPassword@MyHiddenDomain/MyHiddenPC/MyHiddenShare
- I press the "Continue" button
- I type this name in the "Name:" field: Xerox-WorkCentre-5325
- I press the "Continue" button
- I select the "Xerox" option (for the "Make:" field)
- I press the "Continue" button
- I select the "Xerox Work Centre 7345" option (for the "Model:" field)
Unfortunately, there is no Xerox Work Centre 5325 model in the list so I hope it is compatible with Xerox Work Centre 7345.
- I press the "Add Printer" button

After that, I try to print a test page:
- I go to "Printers"
- I go to "Xerox-WorkCentre-5325"
- I select "Print Test Page"

In the error_log file, I can see that the smb backend is used by CUPS but there is an error (status 2):
$ grep "smb" error_log:
D [05/Feb/2018:11:02:16 +0100] [Job 11] envp[24]="DEVICE_URI=smb://MyHiddenDomain/MyHiddenPC/MyHiddenShare"
I [05/Feb/2018:11:02:16 +0100] [Job 11] Started backend /usr/lib64/cups/backend/smb (PID 2054)
D [05/Feb/2018:11:02:16 +0100] [Job 11] envp[24]=\"DEVICE_URI=smb://MyHiddenDomain/MyHiddenPC/MyHiddenShare\"
D [05/Feb/2018:11:02:16 +0100] [Job 11] PID 2054 (/usr/lib64/cups/backend/smb) stopped with status 2.

In the "/etc/cups/printers.conf" file, I can see the device URI without username and password:
$ sudo grep "DeviceURI" /etc/cups/printers.conf
DeviceURI smb://UPPA/repro-prox/PauSciencesInfo2B3

So, as no username or password is provided, it makes sense that I cannot print.

It seems that my message is not sent to the mailinglist when I attach the "/etc/cups/printers.conf" and the "error_log" files so I store them here:
- http://yugiohjcj.free.fr/printers.conf
- http://yugiohjcj.free.fr/error_log

Do you see why CUPS cannot print please?

On Sat, 03 Feb 2018 12:22:40 -0500
Michael Sweet <msweet at apple.com> wrote:

> You are doing the 5-argument version that takes data from stdin.  You want to add the print file on the end (as well), for a total of 6 arguments.  "man backend"
> 
> As for seeing how CUPS is running the backend, "man cupsctl" to enable debug logging and then look at the log file (usually /var/log/cups/error_log) for the job in question.
> 
> 
> > On Feb 2, 2018, at 10:07 PM, YuGiOhJCJ Mailing-List <yugiohjcj-mailinglist at laposte.net> wrote:
> > 
> > I have already included the filename on the command-line.
> > Indeed, my filename is "2.pdf".
> > However, when I am reading the man of smbspool, it seems that I do not follow the synopsis:
> > smbspool {job} {user} {title} {copies} {options} [filename]
> > 
> > What I am currently doing is something like that:
> > smbspool {printer} {job} {user} [filename] {copies}
> > 
> > I am trying to apply manually to the smbspool command the same arguments than the ones CUPS is applying to the smbspool command:
> > ---
> > $ grep "args" error_log
> > D [31/Jan/2018:09:35:36 +0100] [Job 5] Gutenprint: command line: Xerox-WorkCentre-5325 \'5\' \'yugiohjcj\' \'2.pdf\' \'1\' <args>
> > ---
> > But I don't think these are arguments for the smbspool command.
> > It does not follow the synopsis of that command.
> > It seems that these are arguments for gutenprint.
> > 
> > Is there a way to see what are the arguments applied by CUPS to the smbspool command please?
> > That could be useful to understand why /usr/lib64/cups/backend/smb stopped with status 1.
> > 
> > Well, I have to admit that some questions in my messages are related to Samba but some others are clearly related to CUPS.
> > CUPS is calling the Samba backend so there is a relationship between these two programs.
> > My question 1) is for Samba I guess but my questions 2) and 3) are for CUPS.
> > I am able to print with Samba alone but not with CUPS using the Samba backend so that's why I think that the CUPS mailing list is a good place for my problem.
> > If you feel that none of my questions are related to CUPS, just ignore me please and I am sorry for that.
> > 
> > On Fri, 02 Feb 2018 09:47:51 -0500
> > Michael Sweet <msweet at apple.com> wrote:
> > 
> >> You need to include the filename on the command-line or pipe data into it for printing...
> >> 
> >> But FWIW, this is Samba you are dealing with, not CUPS.
> >> 
> >> 
> >>> On Feb 2, 2018, at 9:31 AM, YuGiOhJCJ Mailing-List <yugiohjcj-mailinglist at laposte.net> wrote:
> >>> 
> >>> I tried at work to run "/usr/bin/smbspool" manually:
> >>> ---
> >>> $ /usr/bin/smbspool Xerox-WorkCentre-5325 \'5\' \'yugiohjcj\' \'2.pdf\' \'1\'
> >>> DEBUG: Connected with username/password...
> >>> ---
> >>> 
> >>> The behavior at work is different from the one at home because it is not the same computer used and the /etc/samba/smb.conf is available.
> >>> However, as you can see above, the smbspool program is never closed!
> >>> 
> >>> I tried again to print through CUPS using the following command: lp my-hidden-file.pdf.
> >>> This time, in the CUPS error_log file, I do not see that CUPS is trying to use /usr/lib64/cups/backend/smb as backend to print.
> >>> That's weird.
> >>> It seems to be using the IPP protocol instead of SMB.
> >>> Indeed, I can find these lines in the error_log file:
> >>> ---
> >>> $ grep "//" error_log
> >>> D [02/Feb/2018:10:35:56 +0100] Create-Job ipp://localhost:631/printers/Xerox-WorkCentre-5325
> >>> D [02/Feb/2018:10:35:56 +0100] [Client 16] Returning IPP successful-ok for Create-Job (ipp://localhost:631/printers/Xerox-WorkCentre-5325) from localhost
> >>> D [02/Feb/2018:10:35:56 +0100] Send-Document ipp://localhost:631/printers/Xerox-WorkCentre-5325
> >>> D [02/Feb/2018:10:35:56 +0100] [Client 17] Returning IPP successful-ok for Send-Document (ipp://localhost:631/printers/Xerox-WorkCentre-5325) from localhost
> >>> ---
> >>> 
> >>> I expected to have something similar to this:
> >>> ---
> >>> $ grep "//" error_log
> >>> D [31/Jan/2018:09:35:36 +0100] Create-Job ipp://localhost:631/printers/Xerox-WorkCentre-5325
> >>> D [31/Jan/2018:09:35:36 +0100] [Client 61] Returning IPP successful-ok for Create-Job (ipp://localhost:631/printers/Xerox-WorkCentre-5325) from localhost
> >>> D [31/Jan/2018:09:35:36 +0100] Send-Document ipp://localhost:631/printers/Xerox-WorkCentre-5325
> >>> D [31/Jan/2018:09:35:36 +0100] [Job 5] envp[24]="DEVICE_URI=smb://MyHiddenDomain/MyHiddenPC/MyHiddenShare"
> >>> D [31/Jan/2018:09:35:36 +0100] [Client 62] Returning IPP successful-ok for Send-Document (ipp://localhost:631/printers/Xerox-WorkCentre-5325) from localhost
> >>> D [31/Jan/2018:09:35:36 +0100] [Job 5] envp[24]=\"DEVICE_URI=smb://yugiohjcj:MyHiddenPassword@MyHiddenDomain/MyHiddenPC/MyHiddenShare\"
> >>> ---
> >>> 
> >>> Why CUPS is not using the SMB protocol anymore to print please?
> >>> 
> >>> On Thu, 01 Feb 2018 12:44:57 +0100
> >>> YuGiOhJCJ Mailing-List <yugiohjcj-mailinglist at laposte.net> wrote:
> >>> 
> >>>> Hello,
> >>>> 
> >>>> There is a printer at work (a Xerox WorkCentre 5325).
> >>>> I am able to print using the following command: smbclient //MyHiddenPC/MyHiddenShare -WMyHiddenDomain -c 'print my-hidden-file.pdf'.
> >>>> However, it does not work when I try to print through CUPS using the following command: lp my-hidden-file.pdf.
> >>>> In the CUPS error_log file, the only error I can read is: [Job 5] PID 27883 (/usr/lib64/cups/backend/smb) stopped with status 1.
> >>>> I am using samba-4.4.4 and cups-2.1.4 on the client side (Slackware64 14.2 operating system).
> >>>> 
> >>>> Any suggestion please?
> >>>> 
> >>>> I remarked that "ls -l /usr/lib64/cups/backend/smb" gives "/usr/bin/smbspool" as target.
> >>>> When I run "/usr/bin/smbspool" manually with the same options than in the error_log file (/usr/bin/smbspool Xerox-WorkCentre-5325 \'5\' \'yugiohjcj\' \'2.pdf\' \'1\') I get status 1 and this error message: "ERROR: Can't load /etc/samba/smb.conf - run testparm to debug it".
> >>>> Indeed, /etc/samba/smb.conf is missing (I thought it was not mandatory for the client part).
> >>>> Creating the /etc/samba/smb.conf file seems to be the solution.
> >>>> Well, I will try that at work.
> >>>> 
> >>>> I have three questions:
> >>>> 1) Do you know which PPD file is used when I am printing with the smbclient command? (I have not specified any PPD file through this command line so I am wondering how it works)
> >>>> 2) It seems that the password stored in /etc/cups/printers.conf is sent through network in the device URI using the smb protocol. So, is it encrypted or anyone can see it?
> >>>> 3) When I go to localhost:631 to add the printer I give the full URI: smb://yugiohjcj:MyHiddenPassword@MyHiddenDomain/MyHiddenPC/MyHiddenShare but when I look in the /etc/cups/printers.conf file I only see this: smb://MyHiddenDomain/MyHiddenPC/MyHiddenShare. Why the username and password are not here please?
> >>>> 
> >>>> Thank you.
> >>>> Best regards.
> >>>> _______________________________________________
> >>>> cups mailing list
> >>>> cups at cups.org
> >>>> https://lists.cups.org/mailman/listinfo/cups
> >>> _______________________________________________
> >>> cups mailing list
> >>> cups at cups.org
> >>> https://lists.cups.org/mailman/listinfo/cups
> >> 
> >> _________________________________________________________
> >> Michael Sweet, Senior Printing System Engineer
> >> 
> >> _______________________________________________
> >> cups mailing list
> >> cups at cups.org
> >> https://lists.cups.org/mailman/listinfo/cups
> 
> _________________________________________________________
> Michael Sweet, Senior Printing System Engineer
> 


More information about the cups mailing list