[Samba] Print to JetDirect

M at samba.org M at samba.org
Tue Sep 3 08:46:01 GMT 2002


i´ve got the same problem with the 500x...

my solution uses the "nc" (netcat) tool to send the raw data to port 9102 (lpt2) of
the printerserver.

check out the attached printcap, relevant smb.conf & the shellscript which calls nc

you have to modify it to suit your needs (port of printserver, ip-addresses ..)

have fun

Norbert

Bob Crandell wrote:

> Hi,
>
> We just picked up a new client that didn't want to pay the Micr$oft tax so we
> installed Samba.  There are a variety of issues we need to work through, the first
> of which is printing to a JetDirect 500X 3 port print server.  They have 2 other
> models that we have working.
>
> pcguest belongs to the lp group.
> The permissions on all spool directories are the same.
>
> Here is the relatevant section of smb.conf:
> This works.
> [HP1220C]
>         available = yes
>         comment = Our HP DeskJet 1220C Printer
>         path = /var/spool/lpd/HP1220c
>         print command = /usr/bin/lpr -P%p -r %s
>         queuepause command = /usr/sbin/lpc -P%p stop
>         queueresume command = /usr/sbin/lpc -P%p start
>         public = yes
>         writable = no
>         printable = yes
>         browsable = yes
>         force user = pcguest
>         create mask = 0777
>
> This doesn't work.
> [HP4100]
>         available = yes
>         comment = Our HP 4100 Printer
>         path = /var/spool/lpd/HP4100
>         print command = /usr/bin/lpr -P%p -r %s
>         queuepause command = /usr/sbin/lpc -P%p stop
>         queueresume command = /usr/sbin/lpc -P%p start
>         public = yes
>         writable = no
>         printable = yes
>         browsable = yes
>         force user = pcguest
>         create mask = 0777
>
> This is Printcap:
> This Works.
> # HP DeskJet 1220c printer:
> HP1220c:sd=/var/spool/lpd/HP1220c:rw:sh:rm=hp1220c:rp=raw:
>
> This doesn't work.
> # HP OfficeJet K80:
> HPK80:sd=/var/spool/lpd/HPK80:rw:sh:rm=jd500x:rp=raw1:
> # HP DesignJet 750c Color Plotter:
> HP750c:sd=/var/spool/lpd/HP750c:rw:sh:rm=jd500x:rp=raw2:
> # HP LaserJet 4100 Printer:
> HP4100:sd=/var/spool/lpd/HP4100:rw:sh:rm=jd500x:rp=raw3:
>
> I suspect "rp=raw1, rp=raw2, rp=raw3" is the problem.
>
> Thanks
> --
> Bob Crandell
> Assured Computing
> When you need to be sure.
> Voice 541-689-9159
> FAX   240-371-7237
> bob at assuredcomp.com
> www.assuredcomp.com
> Eugene, Or. 97402
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
-------------- next part --------------
#       $OpenBSD: printcap,v 1.3 1999/09/23 01:31:20 deraadt Exp $

#lp|local line printer:\
#       :lp=/dev/lp:sd=/var/spool/lpd:lf=/var/log/lpd-errs:

#rp|remote line printer:\
#       :lp=:rm=printhost:rp=lp:sd=/var/spool/lpd:lf=/var/log/lpd-errs:

rp|LJSEKR:\
        :lp=/dev/null:\
        :rm=192.168.1.201:\
        :rp=IP_10.0.0.201_1:\
        :sd=/var/spool/lpd/LJSEKR:\
        :lf=/var/log/lpd-errs.LJSEKR:\
        :lo=/var/spool/lpd/LJSEKR/lock.LJSEKR:\
        :sh:\
        :mx#0:

rp2|HP1220C:\
        :lp=/dev/null:\
        :sd=/var/spool/lpd/HP1220C:\
        :lf=/var/log/lpd-errs.HP1220C:\
        :if=/usr/local/samba/bin/smbprint:\
        :lo=/var/spool/lpd/HP1220C/lock.HP1220C:\
        :sh:mx#0:

#rp3|OCE5200:\
#       :lp=:\
#       :rm=10.0.0.200:\
#       :rp=9102:\
#       :sd=/var/spool/lpd/OCE5200:\
#       :lf=/var/log/lpd-errs.OCE5200:\
#       :lo=/var/spool/lpd/OCE5200/lock.OCE5200:\
#       :sh:mx#0:

# der Oce 5200 Plotter haengt an einem HP JetDirect 500X
# Printserver, dessen LPD Funktionalitaet nicht funktioniert
# aus diesem Grund wurde ein Script geschrieben, welches
# die Spooldaten mit dem "NetCat" (=nc) - Tool direct
# auf Port 9102 des HP JD 500X sendet.
# das Script ist fuer den lokalen LPD als
# Input Filter implementiert (siehe if= )


rp3|OCE5200:\
        :lp=/dev/null:\
        :if=/usr/local/samba/bin/nc2hpjetdirect.sh:\
        :sd=/var/spool/lpd/OCE5200:\
        :lf=/var/log/lpd-errs.OCE5200:\
        :lo=/var/spool/lpd/OCE5200/lock.OCE5200:\
        :sh:mx#0:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nc2hpjetdirect.sh
Type: application/x-sh
Size: 250 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba/attachments/20020903/6d8da9a8/nc2hpjetdirect.sh
-------------- next part --------------
[oce5200]
	path = /var/spool/lpd/OCE5200
	printable = Yes
	printer name = OCE5200



More information about the samba mailing list