Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jan 2005 15:06:32 -0600
From:      "Andras Kende" <andras@kende.com>
To:        <mikko@whitecortex.net>, <questions@freebsd.org>
Subject:   RE: samba printing
Message-ID:  <20050123210639.3AD7C43D3F@mx1.FreeBSD.org>
In-Reply-To: <1106505227.25875.29.camel@whitecortex.net>

next in thread | previous in thread | raw e-mail | index | archive | help


-----Original Message-----
From: owner-freebsd-questions@freebsd.org
[mailto:owner-freebsd-questions@freebsd.org] On Behalf Of Mikko Heiskanen
Sent: Sunday, January 23, 2005 12:34 PM
To: questions@freebsd.org
Subject: samba printing

Hi list,

I'm having hard time getting printing working from samba winXP client to
a printer parallelport connected to my FreeBSD-4.10-release box.
I have a HP Laserjet 1200 -printer, and am using LPD and apsfilter with
postscript driver as suggested by linuxprinting.org.

Everything works real well under BSD, but I am unable to get any output
to printer from the Windows box.

I have gathered different bits and pieces from around the net and
manuals, and have come up with the following:

/etc/printcap:
lp|PS;r=1200x1200;q=medium;c=full;p=a4;m=auto:\
    :lp=/dev/lpt0:\
    :if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\
    :sd=/var/spool/lpd/lp:\
    :lf=/var/spool/lpd/lp/log:\
    :af=/var/spool/lpd/lp/acct:\
    :mx#0:\
    :sh:
raw|hp|HP LaserJet 1200:\
        :lp=/dev/lpt0:\
        :sd=/var/spool/raw:\
        :lf=/var/spool/raw/log:\
        :af=/var/spool/raw/acct:\
        :mx#0:\
        :sf:\
        :sh:

$ ls -ld /var/spool/lpd/lp
drwxr-xr-x  2 root  daemon  512 Jan 23 19:59 /var/spool/lpd/lp
$ ls -ld /var/spool/raw/  
drwxr-xr-x  2 root  wheel  512 Jan 23 19:57 /var/spool/raw/

/usr/local/etc/smb.conf:
[global]
        hosts allow 10.0.0.
        security = user
        encrypt passwords = yes
        socket options = TCP_NODELAY 
        client code page=850
        wins support = yes
        printing = bsd
        printcap name = /etc/printcap
[lp]
        comment = Laserjet 1200
        path = /var/spool/samba
        printer name = raw
        public = yes
        writeable = no
        printable = yes

$ ls -ld /var/spool/samba/
drwxrwxrwt  2 root  wheel  512 Jan 23 20:03 /var/spool/samba/

In the Windows box, I've added a local printer with the "Add new printer
wizard" pointing it to lpt1-port. After that, I have opened a command
prompt, and typed "net use lpt1: \\10.0.0.1\lp".

I have filesharing also in samba, and that works without problems.

My windows username and password are same as samba username and
password.

However, as said, nothing gets printed. No files are in the
spooldirectories. I do not know how to proceed, and would love some
guidance. Thanks,
Mikko

ps. would hate to have to put it into windows box, as printer supports
PS.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




Hello,


Looks like the spool directories are different in /etc/printcap and
in smb.conf:

sd=/var/spool/raw:

path = /var/spool/samba

Try to set to the same path, also make sure windows user has
Enough privileges to write to spool directory...

Best regards,

Andras Kende
http://www.kende.com





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