[cups.general] cups Digest, Vol 104, Issue 9 Need help with cups backend smb

Joe Dagastine joedagastine at bellsouth.net
Mon Sep 10 09:33:10 PDT 2012


Send cups mailing list submissions to
	cups at easysw.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.easysw.com/mailman/listinfo/cups
or, via email, send a message with subject or body 'help' to
	cups-request at easysw.com

You can reach the person managing the list at
	cups-owner at easysw.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of cups digest..."


Today's Topics:

    1. Webinterface empties cupsd.conf CUPS 1.5.3.1 (Marcel)
    2. Webinterface empties cupsd.conf on 1.5.3-1 (Marcel)
    3. Re: /usr/libexec/cups/backend/usb failed (Grant)
    4. Re: /usr/libexec/cups/backend/usb failed (Michael Sweet)
    5. Re: Need help with cups backend smb (Stefano Ansoldi)


----------------------------------------------------------------------

Message: 1
Date: Sat, 08 Sep 2012 12:56:34 -0700
From: Marcel <hamade.marcel at gmail.com>
Subject: [cups.general] Webinterface empties cupsd.conf CUPS 1.5.3.1
To: cups at easysw.com
Message-ID: <41812-cups.general at news.easysw.com>

Hi everybody,
I've set up a CUPS server on Debian Wheezy on my Rasperry Pi following 
this tutorial:
http://rohankapoor.com/2012/06/configuring-the-raspberry-pi-as-an-airprint-server/

I did the changes to the cupsd.conf-File with the nano-Editor and 
started the Webinterface.
But as soon as I change anything in my configfile via Webinterface, and 
the server restarts, it empties the whole cupsd.conf file.

I've read that this bug is old and has been dealt with. Why do I still 
have this bug?

Thanks in advance
Marcel


------------------------------

Message: 2
Date: Sat, 08 Sep 2012 12:56:56 -0700
From: Marcel <hamade.marcel at gmail.com>
Subject: [cups.general] Webinterface empties cupsd.conf on 1.5.3-1
To: cups at easysw.com
Message-ID: <41813-cups.general at news.easysw.com>

Hi everybody,
I've set up a CUPS server on Debian Wheezy on my Rasperry Pi following 
this tutorial:
http://rohankapoor.com/2012/06/configuring-the-raspberry-pi-as-an-airprint-server/

I did the changes to the cupsd.conf-File with the nano-Editor and 
started the Webinterface.
But as soon as I change anything in my configfile via Webinterface, and 
the server restarts, it empties the whole cupsd.conf file.

I've read that this bug is old and has been dealt with. Why do I still 
have this bug?

Thanks in advance
Marcel


------------------------------

Message: 3
Date: Sun, 9 Sep 2012 02:05:17 -0700
From: Grant <emailgrant at gmail.com>
Subject: Re: [cups.general] /usr/libexec/cups/backend/usb failed
To: "Mirror of cups.general Newsgroup" <cups at easysw.com>
Message-ID:
	<CAN0CFw1Xqis5xvi3PA5sVexUxLrEEDkhMPE_hrZVH9Y_aYZkRg at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

>> Yes, you should have no problems sending jobs from 1.5.2 to 1.6.1.  Just keep in mind that if you are using CUPS browsing for printer sharing on the 1.5.2 machine, it is no longer supported in 1.6.x...
>
> I gave it a try and I'm told there is a long printing delay now.
> Apparently it's up to 4-5 minutes for a 4-page PDF.  I've upgraded the
> client to 1.6.1 and I'll know if that helped soon.
>
> I get these from the server error_log on cupsd restart now:
>
> CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The
> name org.freedesktop.ColorManager was not provided by any .service
> files
> CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The
> name org.freedesktop.ColorManager was not provided by any .service
> files
>
> and this in the same log with each print, although Google says this
> was due to the mismatch in server/client cups versions and not a
> problem:
>
> Unexpected 'document-format' operation attribute in a Create-Job request.
>
> Do you know what might be causing the delay and if upgrading the
> client to 1.6.1 should fix it?
>
> - Grant

Both the client and server are on cups-1.6.1 now.  A Brother laser
printer is printing PDF files fine and a Zebra LP2844 is printing EPL
files fine, but there is a 10-second delay between ZPL labels with a
Zebra LP2844-Z when there was no delay with the client and server on
cups-1.5.2.  The ZPL label is printed like this:

system(qq{/bin/echo "^XA
^MNN
^LL235
^FO290,60^A0N,125,70^FD$sku^FS
^XZ" | /usr/bin/lpr -l -P Zebra_LP_2844-Z_4x1});

There is nothing in the cups error_log.  Can I debug this?

- Grant



------------------------------

Message: 4
Date: Sun, 09 Sep 2012 12:27:39 -0400
From: Michael Sweet <msweet at apple.com>
Subject: Re: [cups.general] /usr/libexec/cups/backend/usb failed
To: "Mirror of cups.general Newsgroup" <cups at easysw.com>
Message-ID: <D3E909C5-7C7D-4DB7-B879-BD177FA2760E at apple.com>
Content-Type: text/plain; CHARSET=US-ASCII

Grant,

On 2012-09-09, at 5:05 AM, Grant <emailgrant at gmail.com> wrote:
> ...
> files fine, but there is a 10-second delay between ZPL labels with a
> Zebra LP2844-Z when there was no delay with the client and server on
> cups-1.5.2.  The ZPL label is printed like this:
>
> system(qq{/bin/echo "^XA
> ^MNN
> ^LL235
> ^FO290,60^A0N,125,70^FD$sku^FS
> ^XZ" | /usr/bin/lpr -l -P Zebra_LP_2844-Z_4x1});
>
> There is nothing in the cups error_log.  Can I debug this?


How is the Zebra printer configured? (raw, ZPL label printer driver from 
CUPS, ???)

Running "cupsctl --debug-logging" will tell you more about what is 
happening...

__________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair



------------------------------

Message: 5
Date: Thu, 6 Sep 2012 09:56:58 +0000 (UTC)
From: Stefano Ansoldi <stefano.ansoldi at gmail.com>
Subject: Re: [cups.general] Need help with cups backend smb
To: cups at easysw.com
Message-ID: <loom.20120906T113415-399 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

Scott Carradice <scott at ...> writes:

>
> I have set up samba and it seems to be working properly. The following command
works well for me:
>
> smbspool "smb://user:pass <at> computer/printerone" 30 1 1 1 1
testprintfile.prn
>
> testprintfile.prn is a file I made under windows with the print to file
option.
>
> I have set up a printer with the webmin utility for cups.  The files do not
print and I look at the output of "ps xa
> | grep smb" and get:
>
> 2063 ?        S      0:00 smbd -D
>  2886 ?        S      0:00 smb://user:pass <at> computer/printerone 24 root
498261_1_test_print.cgi 1  /var/spool/cups/d00024-001
>
> It looks to me cups is not passing enough arguments to the smbspool program.
There should be one more element
> after the "1".  Job number is 24, user is root, title is
498261_1_test_print.cgi copies are 1.  Now if in my
> testing of smbspool I do no put anything in the options position it just seems
to hang just before > it should print.  > > I am using using the "HP 
LaserJet Series CUPS v1.1" driver for the printer which is a hp laserjet 
1000 without
> any ps options.
>
> Any help in getting this working would be much appreciated.
>
> Scott
>
> P.S. following are printer.conf and error logs.
>
> Printer.conf:
>
> [OMITTED IN REPLY]
>
> This is the errorlog:
>
> [OMITTED IN REPLY]>

Dear Scott,

I had exactly the same problem... which I would have never solved 
without your
post! Also in my version of Linux (Ubuntu 10.04 LTS) one parameter is 
missing
when CUPS calls smbspool through the smb backed. Then smbspool thinks 
the file
to be printed is missing and waits for it until the print job is cancelled.

I solved the problem following the instructions in this link

http://willem.engen.nl/projects/cupssmb/

in the section "A CUPS backend using smbclient".

Basically you can create another backend (called, for instance, smbc) 
using the
shell script reported below. The script uses smbclient to submit the 
print job
to the samba server: credentials (if required) can be set up in a 
separate file
(following, for example, the instructions in the link above,
"/etc/samba/printing.auth" *note* in my case I did not have to change the
ownership of the file [root,root] and I made it readable by the owner [root]
only).

You can then reconfigure the printer by using smbc as a backend instead than
smb (so you will end up with something like "smbc://computer/printerone").

Best,

Stefano

---------- smbc - taken from http://willem.engen.nl/projects/cupssmb/ 
---------

#!/bin/sh

if [ "$1" = "" ]; then
	# list supported output types
	echo 'network smbc "Unknown" "Windows Printer using smbclient"'
	exit 0
fi

job="$1"
account="$2"
title="$3"
numcopies="$4"
options="$5"
filename="$6"

if [ "$filename" = "" ]; then
	filename=-
fi

# strip protocol from printer
printer=`echo "${DEVICE_URI}" | sed 's/^.*://'`

# and print using smbclient
echo "NOTICE: smbclient -N -A /etc/samba/printing.auth -c \"print 
${filename}\" \"${printer}\"" 1>&2

errtxt=`smbclient -N -A /etc/samba/printing.auth -c "print ${filename}" 
"${printer}" 2>&1`
ret=${?}


#
# Handle errors
#   see backend(7) for error codes

# log message
if [ "$ret" = "0" ]; then
	echo "$errtxt" | sed 's/^/NOTICE: /' 1>&2
else
	echo "$errtxt" | sed 's/^/ERROR: /' 1>&2
fi

# "NT_STATUS_LOGON_FAILURE" -> CUPS_BACKEND_AUTH_REQUIRED
echo "$errtxt" | grep -i 'LOGON_FAILURE' >/dev/null && return 2
# "Unable to open credentials file!" -> CUPS_BACKEND_AUTH_REQUIRED
echo "$errtxt" | grep -i 'credentials' >/dev/null && return 2
# "NT_STATUS_BAD_NETWORK_NAME" -> CUPS_BACKEND_STOP
echo "$errtxt" | grep -i 'BAD_NETWORK_NAME' >/dev/null && return 4

# something went wrong, don't know what -> CUPS_BACKEND_FAILED
[ "$ret" != "0" ] && return 1

# success! -> CUPS_BACKEND_OK
return 0

==========================




------------------------------

_______________________________________________
cups mailing list
cups at easysw.com
http://lists.easysw.com/mailman/listinfo/cups


End of cups Digest, Vol 104, Issue 9
************************************





More information about the cups mailing list