Printer fun - controlling queue from Windows NT clients

Timothy J. O'Brien
Wed, 12 Jan 2000 18:10:45 -0000

I have set up a Samba server to act as our lab's print server for a bunch
of NT clients. It works quite well, except for one thing. Nobody can
control the print queue from Windows. When a job is sent, it never shows
up in the Windows print queue window, even when there are lots of other
jobs ahead of it. Using lpq under Linux shows the jobs just fine. Lprm et
al work perfectly too. So I assume the Unix side of printing is working
exactly as it should. When someone brings up a print queue window in NT,
the taskbar shows an occasional '<refreshing>' but no jobs (I
assume it's
just expressing how it feels to talk to something other than another
Windows machine :)

The guest account referenced in smb.conf exists, and can print. The user
'nobody'  also can print and does exist.

I've been fighting with this problem for a long time now, and just can't
think of anything else if could be. Any and all help will be greatly
appreciated.

Here's a copy of smb.conf on the machine in question:

# Global parameters
[global]
        workgroup = VMIC
        server string = B2 Print Server v%v
        encrypt passwords = Yes
        map to guest = Bad Password
        log file = /var/log/smbaccess.log.%m
        max log size = 50
        name resolve order = host wins bcast
        deadtime = 120
        read prediction = Yes
        socket options = TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
        client code page = 437
        os level = 35
        preferred master = Yes
        wins server = 172.22.4.199
        #wins support = Yes
        panic action = /bin/smbpanic %d %a %I %U
        guest account = guest
        invalid users = root
        print command = /bin/pt %p %s %M %U %T %a %v %m %I %d
        lpq command = /usr/bin/lpq %p
        lprm command = /usr/bin/lprm %j

[tb]
        comment = tinkerbell in B2 lab
        path = /var/spool/samba
        guest ok = Yes
        print ok = Yes
        printer driver = HP LaserJet 5Si/5Si MX PS

[thoth]
        comment = thoth in B2 lab
        path = /var/spool/samba
        guest ok = Yes
        print ok = Yes
        printer driver = Lexmark Optra L Series PS

[homes]
        comment = Home Directory
        read only = No
        create mask = 0700
        directory mask = 0700
        browseable = No

<end of smb.conf>

The /bin/pt script that is called for printing is very simple.. Here it
is:

#!/bin/sh

# Print the job and send the user a neat-o little WinPopup message


/usr/bin/lpr -h -r -P $1 $2
(echo "Printjob from $3 (user $4) spooled"
 echo "on $5 $6"
 echo "  "
 echo "Client Type: $7, PID $PPID") | /usr/local/bin/smbclient -M $9
-I $3
-U "daemon@b2dnprt.eng.vmic.com"

<end of /bin/pt>

The system is running Debian 2.1, Samba 2.0.6, kernel 2.0.36. The printers
are connected using the paralell ports rather than JetDirect cards.

Thanks once again!

--
Tim O'Brien (tjobrien@hiwaay.net, KF4YTI)

OAsys Engineering
Madison, AL 35757
(256) 430-4309
--