Just to keep the concept in mind here, when printing with samba the
client simple passes the printfile to the server, (path =) which then
invokes the linux printing system to print the file. It is very simple.
This sorta sounds like a driver problem, but let me be sure here:
with printer command = cat %s > /tmp/%s (or something similar) your print
job winds up in /tmp. It will have a funny name, since you haven't tried
to pass the name of the print job with %J. You really don't have to even
cat the file, since it will wind up where ever you point your path =
parameter in smb.conf.
If you have this print file in tmp, can you print this file either with cat
file > /dev/lp0 (or whatever) or with lpr -PPrinterName filename ?
Below is my set of printer definitions. These report the actual file name,
not the funny samba temporary names, just for future reference.
Does your guest user have sufficient privileges to print? Have you tried
making the guest user root, JUST FOR TESTING purposes?
I have three different queues for the same printer, each of which has
a different resolution. Also a raw queue, in case I install the real printer
drivers on windows. I find it FAR easier to install generic postscript
drivers (HP or something) on the windows clients, since they all come with
them, and convert the postscript file to my printer language on the linux
server.
BTW, since you are using LPRNG, you can use anything you want for the
print command in your smb.conf, which should make troubleshooting this
problem easier.
Joel
[lp]
comment = Raw Printer for Z53
# max print jobs = 1
path = /tmp
create mask = 0700
guest ok = yes
hosts allow = 192.168.
printable = Yes
printing = lprng
# print command = echo "Tried to print %s" > /SPOOL/junk.%s
# print command = echo %J %p %s >> /tmp/junkJ; /usr/bin/lpr -Plp -J'%J' %s; rm
%s
# print command = echo %J %p %s >> /tmp/junkJ; j=`echo %J | sed "s/^.*-//"`;
/usr/bin/lpr -Plp -J'$j' %s; rm %s
# print command = echo %J %p %s >> /tmp/junkJ; /usr/bin/lpr -Plp -J'%J' %s; rm
%s
print command = echo %J %p %s >> /tmp/junkJ;\
a="`echo '%J' | sed "s/^.*- //"`" ;\
echo This is truncated $a >> /tmp/junkJ;\
/usr/bin/lpr -Plp -J"$a" %s;\
rm %s
lpq command = /usr/bin/lpq -Plp
lprm command = /usr/bin/lprm -Plp %j
lppause command = /usr/sbin/lpc hold -Plp %j
lpresume command = /usr/sbin/lpc release -Plp %j
printer name = lp
# printer driver = Lexmark Z53 Series ColorFine
# printer driver location = \\HAMMER2\AllFiles\usr\local\samba\printer
share modes = No
[ps]
comment = Filtered for Z53
path = /tmp
read only = No
create mask = 0700
guest ok = yes
hosts allow = 192.168.
printable = Yes
printing = lprng
# print command = echo %J %p %s >> /tmp/junkJ; /usr/bin/lpr -Pps -J'%J' %s; rm
%s
# print command = echo %J %p %s >> /tmp/junkJ; /usr/bin/lpr -Pps -J'%J' %s; rm
%s
print command = echo %J %p %s >> /tmp/junkJ;\
a="`echo '%J' | sed "s/^.*- //"`" ;\
echo This is truncated $a >> /tmp/junkJ;\
/usr/bin/lpr -Pps -J"$a" %s;\
rm %s
lpq command = /usr/bin/lpq -Pps
lprm command = /usr/bin/lprm -Pps %j
lppause command = /usr/sbin/lpc hold ps %j
lpresume command = /usr/sbin/lpc release ps %j
share modes = No
use client driver = yes
[Draft]
comment = Print drafts
path = /tmp
read only = No
create mask = 0700
guest ok = yes
hosts allow = 192.168.
printable = Yes
printing = lprng
print command = echo %J %p %s >> /tmp/junkJ;\
a="`echo '%J' | sed "s/^.*- //"`" ;\
echo This is truncated $a >> /tmp/junkJ;\
/usr/bin/lpr -PDraft -J"$a" %s;\
rm %s
lpq command = /usr/bin/lpq -PDraft
lprm command = /usr/bin/lprm -PDraft %j
lppause command = /usr/sbin/lpc hold Draft %j
lpresume command = /usr/sbin/lpc release Draft %j
share modes = No
use client driver = yes
[Photo]
comment = Print Photos
path = /tmp
read only = No
create mask = 0700
guest ok = yes
hosts allow = 192.168.
printable = Yes
printing = lprng
print command = echo %J %p %s >> /tmp/junkJ;\
a="`echo '%J' | sed "s/^.*- //"`" ;\
echo This is truncated $a >> /tmp/junkJ;\
/usr/bin/lpr -PPhoto -J"$a" %s;\
rm %s
lpq command = /usr/bin/lpq -PPhoto
lprm command = /usr/bin/lprm -PPhoto %j
lppause command = /usr/sbin/lpc hold Photo %j
lpresume command = /usr/sbin/lpc release Photo %j
share modes = No
use client driver = yes
On Mon, Nov 17, 2003 at 04:54:26PM -0000, Jeramy Eling wrote:
> Hi all,
>
> I have made all the changes you have each suggested but still to no avail. Even with
> with the simplified smb.conf file etc and the added lines for the guest accounts I
> still recieve no output. I can however confirm that using Christoph's suggestion I
> can print and generate the printfile in my tmp folder and it does contain data.
>
> I don't know if it is relevant but the box is a Redhat 9.0 box clean install.
>
> I really do appreciate all of your suggestions on this matter, and any more pointers
> would be great.
>
> Many Thanks
>
> Jeramy
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> David L. R. Houston
> Sent: 17 November 2003 13:43
> To: [EMAIL PROTECTED]
> Subject: RE: LPRng: Nothing Prints Using Samba and LPRNG
>
>
> This may seem too obvious, but since I have struggled with this as well,
> and it now works fine, I wonder: where in your smb.conf are references to
> your guest account? You have 'Guest ok = yes' but that's it.
>
> FWIW, my own conf files include in the globals section:
>
> guest account = nobody
> security = user
> map to guest = Bad User
>
> I also note that I do NOT have a statement on 'Printing = ...' in the
> gloabls section but instead a reference to printcap:
>
> printcap name = /usr/local/etc/printcap
>
> ...which is of course the LPRNG printcap. The pointer to 'Printing =
> lprng' is in my [printers] section, which also include the various print
> commands you have in your globals.
>
> No doubt I have numerous issues, but it works reliably.
>
> My other suggestion is to crank the samba log level up (20?), wipe out the
> logs, and then do a single test and read them.
>
> Also be sure you can simply connect to the server.
>
> Finally: why do you have those SO_ options in the 'socket options'
> section?
>
> Hope this helps,
>
> David Houston
> CIT Client Services Coordinator
> University of Vermont
>
> On Nov 17, 2003, Jeramy Eling wrote:
>
> JE. As requested here is my smb.conf file
> JE.
> JE. [global]
> JE. workgroup = DOMAIN
> JE. netbios name = {ServerName}
> JE. server string = LINUX Print Server
> JE. interfaces = eth1
> JE. security = DOMAIN
> JE. encrypt passwords = Yes
> JE. password server = *
> JE. log level = 3
> JE. log file = /var/log/samba/log.%m
> JE. max log size = 50
> JE. socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
> JE. dns proxy = No
> JE. wins server =
> JE. winbind uid = 10000-20000
> JE. winbind gid = 10000-20000
> JE. winbind separator = +
> JE. printing = lprng
> JE. print command = /usr/bin/lpr [EMAIL PROTECTED] -P%P -r %s
> JE. lpq command = /usr/bin/lpq [EMAIL PROTECTED] -P%P
> JE. lprm command = /usr/bin/lprm [EMAIL PROTECTED] -P%P %j
> JE. lppause command = /usr/sbin/lpc [EMAIL PROTECTED] hold %p %j
> JE. lpresume command = /usr/sbin/lpc [EMAIL PROTECTED] release %p %j
> JE. queuepause command = /usr/sbin/lpc [EMAIL PROTECTED] stop %p
> JE. queueresume command = /usr/sbin/lpc [EMAIL PROTECTED] start %p
> JE.
> JE. [homes]
> JE. comment = Home Directories
> JE. read only = No
> JE. browseable = No
> JE.
> JE. [printers]
> JE. comment = All Printers
> JE. path = /var/spool/lpd/samba
> JE. create mask = 0700
> JE. guest ok = Yes
> JE. printable = Yes
> JE. browseable = No
> JE.
> JE. [HP4500]
> JE. path = /var/spool/lpd/samba
> JE. printer admin = "ARTHUR+DOMAIN ADMINS"
> JE. read only = No
> JE. guest ok = Yes
> JE. printable = Yes
> JE. printer name = HP4500
> JE. use client driver = Yes
> JE. oplocks = No
> JE.
> JE. -----Original Message-----
> JE. From: Christoph Beyer [mailto:[EMAIL PROTECTED]
> JE. Sent: 17 November 2003 10:18
> JE. To: Jeramy Eling
> JE. Cc: [EMAIL PROTECTED]
> JE. Subject: Re: LPRng: Nothing Prints Using Samba and LPRNG
> JE.
> JE.
> JE. please send four smb.conf file...
> JE.
> JE. best regards
> JE. ~christoph
> JE.
> JE.
> JE. --
> JE. /* Christoph Beyer | Office: Building 2b / 23 *\
> JE. * DESY | Phone: 040-8998-2317 *
> JE. * - IT - | Fax: 040-8998-4060 *
> JE. \* 22603 Hamburg | http://www.desy.de */
> JE.
> JE.
> JE. On Mon, 17 Nov 2003, Jeramy Eling wrote:
> JE.
> JE. > Hi all,
> JE. >
> JE. > We are in the process of evaluating the LPRng print system with a
> JE. > view to replace our current unreliable Windows 2000 spooler.
> JE. >
> JE. > We have configured it on our Redhat 9.0 system and printing from the
> JE. > local machine works fine, however we have now installed SAMBA ready
> JE. > to test from our Windows clients and have run into a problem. We
> JE. > followed the steps on the LPRng website to configure SAMBA etc.,
> JE. > joined the server to our windows domain and installed the printer on
> JE. > a Windows XP PC. When we print from the windows XP PC nothing
> JE. > prints, it is as if the whole job just disappears. Having tried
> JE. > every possible combination of configs in the smb.conf file we are
> JE. > now at a loss.
> JE. >
> JE. > Does anyone have any ideas why this is happening?
> JE. >
> JE. > Many Thanks
> JE. >
> JE. > Jeramy.
> JE. >
> JE. > -----------------------------------------------------------------------------
> JE. > YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> JE. > The address you post from MUST be your subscription address
> JE. >
> JE. > If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> JE. > or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> JE. > to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> JE. > with: | example:
> JE. > subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> JE. > unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
> JE. >
> JE. > If you have major problems, send email to [EMAIL PROTECTED] with the word
> JE. > LPRNGLIST in the SUBJECT line.
> JE. > -----------------------------------------------------------------------------
> JE. >
> JE.
> JE.
> JE. -----------------------------------------------------------------------------
> JE. YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> JE. The address you post from MUST be your subscription address
> JE.
> JE. If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> JE. or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> JE. to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> JE. with: | example:
> JE. subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> JE. unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
> JE.
> JE. If you have major problems, send email to [EMAIL PROTECTED] with the word
> JE. LPRNGLIST in the SUBJECT line.
> JE. -----------------------------------------------------------------------------
> JE.
>
>
> -----------------------------------------------------------------------------
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> with: | example:
> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems, send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -----------------------------------------------------------------------------
>
> -----------------------------------------------------------------------------
> YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
> The address you post from MUST be your subscription address
>
> If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
> or lprng-digest-requests) with the word 'help' in the body. For the impatient,
> to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
> with: | example:
> subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
> unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
>
> If you have major problems, send email to [EMAIL PROTECTED] with the word
> LPRNGLIST in the SUBJECT line.
> -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------