[Samba] Samba Printing + LPRng Issues

Joel Hammer Joel at HammersHome.com
Sun Aug 11 02:34:00 GMT 2002


I am not sure (read: I have no idea) what is causing this error.
Have you looked at your lpd.perms file? Here is the only line I have in mine. My Windows
users can look at the print queue without problems, after I fixed this thing
up.
DEFAULT ACCEPT
The syntax of lpd.perms is about the most confusing of any configuration
file I have worked with.
Once this works, you will likely want the windows users to see the actual
file name in their queue, not the randomly assigned name which samba gives
them. This works for me:

[lp]
	comment = Raw Printer for Z53
	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

The trick is to use %J to capture the banner page, which contains the
file name from windows. The sed line is to strip off some of the banner,
since some applications send such a long banner line the file name gets
truncated.
Joel


On Sat, Aug 10, 2002 at 11:13:09PM -0700, odc wrote:
> Joel Hammer wrote:
> 
> > This is a common complaint. Let the list know if this works.
> > use client driver = yes
> > Have you tried putting rm %s into your print command?
> > Joel
> 
> Thanks, 'use client driver' seemed to work, however now, the Windows print
> queue shows: "Failed to open, retrying" ; p
> 
> Is there any way to fix this ?
> 
> Its not to urgent actually, I don't think people will need to view the print
> queue at all, but it would be nice to know the fix.
> 
> Thanks.
> 
> 



More information about the samba mailing list