[Samba] Print Server

Joel Hammer Joel at HammersHome.com
Mon May 5 21:41:05 GMT 2003

Just keep a couple of things in mind.

My comments apply to lprng as the linux printing system.

Be sure you specify in the smb.conf file which system you are using.

When you print to a samba server, the print job is transferred to the
print spool defined in the smb.conf share. Then, the print command (which
you should specify in the share) is invoked to print this file. It is
usually best to filter the print job on the windows client before it
gets sent to the linux server, which should print it without having to
filter it.

If you understand this, and realize you can specify all the printing
commands in the share, then trouble shooting printing problems will be
straight forward in most cases.

This is an example of a smb.conf share for a printer. Note that you can have
anything you want for the printing commands. This is very handy.
	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;\
                       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
	share modes = No

Of course, you will need a print queue on the linux server that can
handle raw jobs. It is best to keep things simple.


> A friend of mine owns a print shop.  He has 3 Lanier printers (models 2138, 5265, 5813) They are all LAN attached.  I would like to set up a samba print server for these machines.  I have used samba as strictly a PDC and file server.  I have nerver set up a printer in Linux or in Samba.  I would like to be pointed in the right direction in order to set this up.  Thanks in advanced for any information.
> I have a custom built distribution on this system.  I can install any printing solution (LPR, CUPOS, etc) that would be needed.  I would like to know some of the advantages of each system.  The Lanier systems support PS, PCL 5, and their own custom protocol.  I will be printing from a W2k machine that is joined to a samba PDC.  the serving I would like to set up would also be joined to this PDC.
> Scott Swaim
> scott at qualitycorps.com
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba

More information about the samba mailing list