Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 1996 11:46:55 +0200 (MET DST)
From:      Christoph Kukulies <kuku@gilberto.physik.rwth-aachen.de>
To:        randyd@nconnect.net (Randall D. DuCharme)
Cc:        questions@freebsd.org
Subject:   Re: samba printing
Message-ID:  <199609060946.LAA20375@gilberto.physik.rwth-aachen.de>
In-Reply-To: <199609060401.XAA09435@atlantis.nconnect.net> from "Randall D. DuCharme" at "Sep 5, 96 11:04:37 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> Greetings,
>     I have a small network at my store with an NT server,
> a Samba server running on FBSD 2.1.5-R, a 2.1.5-R workstation,
> and several Win95 clients.  I'm wondering how I go about printing
> to an NT print queue from the Samba server or FBSD workstation.  
> I can see and attatch to the printer using smbclient \\\\servername\\
> sharename -P, and can send a job to the queue using printmode, and 
> print, but can't seem to figure out how to get to it using lpr.  
> 
> Any Ideas??

/etc/printacp:

smblp|PostScript|ps:\
        :mx#0:\
        :lp=/dev/null:\
        :cm=Ghostscript to laser on druckserver:\
        :sd=/var/spool/lp/druckserver:\
        :af=/var/spool/lp/druckserver/acct:\
        :lf=/var/log/lpd-errs:\
        :sh:\
        :if=/usr/local/samba/bin/smbprint-ps:

/usr/local/samba/bin/smbprint-ps:
#!/bin/sh
#
#  psif - Print PostScript or plain text on a PostScript printer
#  Script version; NOT the version that comes with lprps
#  Installed in /usr/local/libexec/psif
#
#DRUCKSERVER=druckserver   This is a bit hacked since I don't actually
# pass the parameters - have them hardwired but you get the idea (C.K.)

DRUCKSERVER=ACC503D
read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`

if [ "$first_two_chars" = "%!" ]; then
   #
   #  PostScript job, print it.
   #
   ( echo $first_line ;  cat ) | \
/usr/local/bin/gs -dSAFER -dNOPAUSE -sDEVICE=ljet3 -sOutputFile=- -q - |  /usr/l
ocal/samba/bin/smbprint
else
   #
   #  Plain text, convert it, then print it.
   #
   ( echo $first_line; cat ) | /usr/local/bin/textps | \

/usr/local/samba/bin/smbprint:
#!/bin/sh
#
(
        echo "print -"
        cat
) | /usr/local/samba/bin/smbclient  \\\\DRUCKSERVC504\\HP_III -U guest%guest -P
-N  >>/tmp/smb-print.log
~



> 
> Thanks!
> Randy

--Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609060946.LAA20375>