Printing from Linux on NT4Wks

Steeve steeve at eps.mcgill.ca
Wed Dec 13 14:48:23 GMT 2000


Dolgopolov Sergey wrote:
> 
> Hello.
> I want to print out from Linux (Samba 2.0.7 as PDC) on the printer which
> stands on NT4 Wks.
> But to regret I it can not make.
> Mine /etc/printcap
> hewlett:\
>        :sd =/var/spool/lpd/hewlett:\
>        :mx#0:\
>        :sh:\
>        :lp =/dev/null:\
>        :lf =/var/spool/lpd/hewlett/error:\
>        :af =/var/spool/lpd/hewlett/acct\
>        :if =/var/spool/lpd/hewlett/print-net:
> 
> Filter print-net:
> 
>  #!/bin/sh
> client = "finance3"
> share = "HewlettP"
> printfile = "/tmp/smbspool. $$ "
> cat > $printfile
> if [-s $printfile]; then
>   (echo "translate"; echo " print $printfile "; echo "quit") \
>   | smbclient \\\\ $client \\ $share -P -N
> fi
> rm -f $printfile

You might have to do a cd in smbclient as well, not sure,

echo "cd `dirname $printfile`"

and, as an aside, your script will look less ugly if 
you use 'smbclient //$client/$share'.

-- 
steeve SysAdmin EPS McGill University Mtl Qc
:wq




More information about the samba-ntdom mailing list