Can't print from NT SP4

Alain M. Gaudrault alain at
Wed Feb 3 01:56:28 GMT 1999

I've had no luck getting NT to print to my Samba-mounted printer. 
Here's the scenario:

I have Samba set up properly enough so that I can see both disk and
printer shares from Network Neighbourhood, I can mount the disk shares
and use them, no problem.  I can even Add a Printer without any
hiccups.  But when I try to print the test page, NT pops up "Test page
failed to print.  Would you like to view the print trouble shooter for
assistance?  The parameter is incorrect."  Attempts to print from any
programmes fail as well.

The strange this is that if I use a command prompt on NT and type "net
use lpt1: \\machine\printer", and then use the "print" command,
everything works!  But if I use the "Add a Printer" dialogue to add a
network printer, no go.

I've included my smb.conf, though I doubt there's a problem there, since
as I said, I can get it to print from NT, but only from the command
line.  Whether I try adding a local or network printer, same deal.

I even went as far as to use strace on smbd to see what was
happening when I tried to print on NT.  It seems like Samba is receiving
the request, but it's not receiving any content to be printed, so it
aborts.  This is what I see:

stat("ALAIN.a08958", {st_mode=0, st_size=0, ...}) = 0
write(3, "Discarding null print job ALAIN."..., 39) = 39
unlink("ALAIN.a08958")                  = 0

I looked earlier to see where ALAIN.a08958 gets created, and between it
being created and closed, there are no writes to the file.  So it seems
like the request is making it, but not the file to print.

Any suggestions?  I have no idea how to proceed, short of diving into
the Samba code, which I'd rather not have to do.

I'm running Samba 1.9.18p10 on RedHat5.1/Intel.  Here's smb.conf:

        server string = mort the Linux box
        interfaces =
        encrypt passwords = Yes
        log level = 4
        syslog = 4
        log file = /var/log/samba/log.%m
        max log size = 50
        socket options = TCP_NODELAY
        os level = 10
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        remote announce =
        comment = samba-mort
        valid users = alain, kim
        read list = alain, kim
        write list = alain
        hosts allow = 127.
        hosts deny = all
        security = user

        comment = Home Directories
        available = no

        comment = All Printers
        path = /tmp
        create mask = 0777
        print ok = Yes
        print command = /usr/bin/lpr -r -P%p %s
        lpq command = /usr/bin/lpq -P%p
        lprm command = /usr/bin/lprm -P%p %j
        printer driver = EPSON Stylus COLOR 640
        browseable = No

A tantot.
quality costs *less*

More information about the samba mailing list