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

Michael Sweet msweet at apple.com
Sat Feb 3 09:22:40 PST 2018


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