Date: Wed, 07 Apr 1999 18:27:15 -0500 From: Don Read <sysop@calcasieu.com> To: "Milliken, Scott" <MillikS@sti.imshealth.com> Cc: <freebsd-questions@FreeBSD.ORG> Subject: Re: SMB Printing Message-ID: <3.0.5.32.19990407182715.008abc40@pop.calcasieu.com> In-Reply-To: <C26E7066AAA6D211AB16006097A52FCC5F6256@STIUSATLCX1.saleste ch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
back on 04:26 PM 4/7/99 -0400, you said: >Hi, > I'm trying to figure out just how to put an entry in /etc/printcap >so that I can print to a Samba shared printer. I have the input filter set >up and have had the printer working when hooked up locally, but I have a >need to print to some other printers that are attached to NT print queues >and do not have lpd running locally on the NT servers. Adding lpd is not an >option as we have territorial admins here that won't give access to admins >from other groups to do things like that. > It would seem that the logical way to approach this would be to have >the spooler print to a file, then pass that file name on to a script that >could call smbclient to attach to the printer, then execute a "print >filename" command. However, I'm not quite sure how to implement that. If >there is an FAQ that covers this, I'd certainly like to know where. I've >checked the FreeBSD handbook and the www.freebsd.org web pages to no avail. > Here's how I work it with W95 & W4W 3.1 "shared" printers shempdm|Debbie's Dot Matrix:\ :lp=/dev/null:sd=/var/spool/lpd/shemp:\ :if=/usr/share/samba/shemp_dm:lf=/var/log/lpd-errs:sh: and the script shemp_dm ----- #!/bin/sh # # edit this to show where your smbclient is smbcmd="/usr/local/bin/smbclient" server="" username="samba" hostname=`hostname` file="/var/tmp/$$" # # get the box & share name from the name of this script. <server>_<ptr> # sname=`basename "$0"` server=`echo "$sname" |cut -d_ -f1` ptr=`echo "$sname" |cut -d_ -f2` cat - > $file printf "\f" >> $file echo print $file | $smbcmd "\\\\$server\\$ptr" -N -P -U $username rm $file ----- Regards, -- Don Read sysop@calcasieu.com EDP Manager dread@texas.net Calcasieu Lumber Co. Austin TX - The problem with people who have no vices is that you can be pretty sure they're going to have some pretty annoying virtues. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.19990407182715.008abc40>