From owner-freebsd-questions@FreeBSD.ORG Mon Jan 24 10:04:12 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1795816A4CE for ; Mon, 24 Jan 2005 10:04:12 +0000 (GMT) Received: from whitecortex.net (whitecortex.net [62.142.244.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id B230143D39 for ; Mon, 24 Jan 2005 10:04:11 +0000 (GMT) (envelope-from mikko@whitecortex.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by whitecortex.net (Postfix) with ESMTP id 9131E5510 for ; Mon, 24 Jan 2005 12:04:10 +0200 (EET) Received: from whitecortex.net ([127.0.0.1]) by localhost (whitecortex.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 48162-02 for ; Mon, 24 Jan 2005 12:04:10 +0200 (EET) Received: by whitecortex.net (Postfix, from userid 3127) id 5E336550E; Mon, 24 Jan 2005 12:04:10 +0200 (EET) From: Mikko Heiskanen To: questions@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1106561050.27158.68.camel@whitecortex.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 24 Jan 2005 12:04:10 +0200 X-Virus-Scanned: by amavisd-new at whitecortex.net Subject: Re: samba printing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mikko@whitecortex.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2005 10:04:12 -0000 On Mon, 2005-01-24 at 04:48, McCy Ron wrote: > I have/had the same problem - couldn't print to the Samba shared printer > until I found in the > "Handbook" a couple of line of code that were missing in my smb.conf.... > > [printers] > comment = Guttenburgs Pride > printable = yes > printing = BSD > printcap name = /etc/printcap > print command = /usr/bin/lpr -P%p -r %s > path = /var/spool/samba > min print space = 2000 > public = yes > > I've got a printcap setting that uses a "pass-through" filter..... > Windows provides the drivers that talk to the printer correctly. BSD > need only pass the bytes through. > > ################################### > ### printcap setup for Samba printer share...... > > broxima|hplj4|Samba Laser:\ > :sh:\ > :lp=/dev/lpt0:sd=/var/spool/output/broxima:\ > :lf=/var/log/smbprt-errs:\ > :if=/usr/libexec/pass-prt:\ > > ### pass-prt ......Pass through filter........ > #!/bin/sh > /bin/cat && exit 0 > exit Right you are about the pass-through. I read from a webpage where there was used a printcap entry with "raw" -driver. I understand it accomplishes the same as the pass-through filter. Correct me if I'm wrong. I've done some more digging, and found the following to put into the samba configuration file. smb.conf: print command = "/usr/bin/lpr -P%S /var/spool/samba/%s; /bin/rm /var/spool/samba/%s; /bin/echo %T %U %M %I %a %S>> /var/spool/samba/smbprint.log" Which, ofcourse, keeps appending to the file, so one might want to logrotate it. So now it is working. Hope this helps others who have struggled to get it work. Oh, and by the way, samba version is 2.2.8a. Mikko