printing still

Marcel Kunath kunathma@pilot.msu.edu
Tue, 19 Dec 2000 12:16:58 -0500 (EST)


just fyi, if anybody cares that I still struggle on this. I just think its samba
 problem and not the filter. stubborn me........

Sometimes I think:
        Linux is a bitch.[1]


[1] Making Linux work with Windows is a bitch.[2]

[2] Windows is a bitch.[3]

[3] Bill G. got as rich as a pimp.[4]

[4] Selling Microsoft products is a trick.[5]

[5] dictionary.com says about
        trick (trk)
        n.
            11. Slang. A robbery or theft.[continue, if time permits]






I have been sitting on this printer problem since a week now and I refuse to
give up. I am slowly starting to think I turn stupid.

I hope nobody is bothered by my details. I got HP2100TN printer with SuSE 7.0
box connected as 192.168.1.100(smurf) and I got LPRng/ifhp installed and
printing fine. I got Samba 2.0.7 installed and it does work fine for a disk
share. I got problem with printer share on Win98 though.

1. My /etc/printcap:

smurf:cm=Network Printer smurf:\
        :lp=smurf.mydomain.com%9100:\
        :sd=/var/spool/lpd/%P:\
        :ifhp=model=hp2100,status@:\
        :sh:\
        :filter=/usr/local/libexec/filters/ifhp:\
        :mx#0

2. My /etc/smb.conf:

[global]
        workgroup = SHADOWWARRIOR
        guest account = nobody
        keep alive = 30
        os level = 2
        kernel oplocks = false
        security = user
        encrypt passwords = yes
        log file = /var/log/samba-log.%m
        lock directory = /var/lock/samba
        hosts allow = 192.168.1.
        interfaces = 192.168.1.1/255.255.255.0
        load printers = yes

[network-drive]
        path = /winmount
        comment = Network Drive
        create mode = 644
        writeable = yes
        guest ok = yes

[printers]
        path = /var/spool/lpd/samba
        print ok = yes
        printing = lprng
        printable = yes
        printcap name = /etc/printcap
        guest ok = yes
        public = yes
        print command =       /usr/bin/lpr  -U%U@%M -P%p -r %s
        lpq command   =       /usr/bin/lpq  -U%U@%M -P%p
        lprm command  =       /usr/bin/lprm -U%U@%M -P%p %j
        lppause command =     /usr/sbin/lpc -U%U@%M hold %p %j
        lpresume command =    /usr/sbin/lpc -U%U@%M release %p %j
        queuepause command =  /usr/sbin/lpc -U%U@%M -P%p stop
        queueresume command = /usr/sbin/lpc -U%U@%M -P%p start


3. Permissions:

mail:~ # ls -l /var/spool/lpd
total 2
drwxr-xr-x   4 lp       lp             77 Dec 18 21:41 .
drwxr-xr-x  14 root     root          305 Dec 18 21:41 ..
drwxrwxrwt   2 root     root           66 Dec 19 07:38 samba
drwx------   2 lp       lp            205 Dec 18 19:48 smurf

4.

mail:~ # cat /etc/hosts
192.168.1.100   smurf.mydomain.com   smurf
198.x.x.x   mail.mydomain.com    mail
192.168.1.1     mail.mydomain.com
192.168.1.2     lab1.mydomain.com    lab1
192.168.1.3     lab2.mydomain.com    lab2

5. Samba starts 'cat /var/log/log.smb':

[2000/12/19 11:32:16, 1] smbd/server.c:main(641)
  smbd version 2.0.7 started.
  Copyright Andrew Tridgell 1992-1998
[2000/12/19 07:37:05, 0] param/loadparm.c:lp_do_parameter(2239)
  Global parameter printcap name found in service section!

6. On Samba start up 'cat /var/log/samba-log.smb' says:

[2000/12/19 11:32:16, 1] smbd/files.c:file_init(216)
  file_init: Information only: requested 10000 open files, 1014 are available.

7.

I installed HP printer drivers locally on Win98 on parallel port and then added
port '\\mail\printers'. I then print and file gets spooled:

mail:~ # ls -l /var/spool/lpd/samba
total 57
drwxrwxrwt   2 root     root           66 Dec 19 07:38 .
drwxr-xr-x   4 lp       lp             77 Dec 18 21:41 ..
-rwxr--r--   1 nobody   nogroup     56603 Dec 19 10:18 PrinterTestPage

The file never gets printed though and never deleted.


8.

mail:~ # testparm
Load smb config files from /etc/smb.conf
Processing section "[network-drive]"
Processing section "[printers]"
Global parameter printcap name found in service section!
Loaded services file OK.
WARNING: You have some share names that are longer than 8 chars
These may give errors while browsing or may not be accessible
to some older clients
Press enter to see a dump of your service definitions
# Global parameters
[global]
        coding system =
        client code page = 850
        workgroup = SHADOWWARRIOR
        netbios name =
        netbios aliases =
        netbios scope =
        server string = Samba 2.0.7
        interfaces = 192.168.1.1/255.255.255.0
        bind interfaces only = No
        security = USER
        encrypt passwords = Yes
        update encrypted = No
        allow trusted domains = Yes
        hosts equiv =
        min password length = 5
        map to guest = Never
        null passwords = No
        password server =
        smb passwd file = /etc/smbpasswd
        root directory = /
        passwd program = /bin/passwd
        passwd chat = *new*password* %n\n *new*password* %n\n *changed*
        passwd chat debug = No
        username map =
        password level = 0
        username level = 0
        unix password sync = No
        restrict anonymous = No
        use rhosts = No
        debug level = 2
        syslog = 1
        syslog only = No
        log file = /var/log/samba-log.%m
        max log size = 5000
        debug timestamp = Yes
        debug hires timestamp = No
        debug pid = No
        debug uid = No
        protocol = NT1
        read bmpx = No
        read raw = Yes
        write raw = Yes
        nt smb support = Yes
        nt pipe support = Yes
        nt acl support = Yes
        announce version = 4.2
        announce as = NT
        max mux = 50
        max xmit = 65535
        name resolve order = lmhosts host wins bcast
        max ttl = 259200
        max wins ttl = 518400
        min wins ttl = 21600
        time server = No
        change notify timeout = 60
        deadtime = 0
        getwd cache = Yes
        keepalive = 30
        lpq cache time = 10
        max disk size = 0
        max open files = 10000
        read prediction = No
        read size = 16384
        shared mem size = 1048576
        socket options = TCP_NODELAY
        stat cache size = 50
        load printers = Yes
        printcap name = /etc/printcap
        printer driver file = /etc/printers.def
        strip dot = No
        character set =
        mangled stack = 50
        stat cache = Yes
        domain groups =
        domain admin group =
        domain guest group =
        domain admin users =
        domain guest users =
        machine password timeout = 604800
        add user script =
        delete user script =
        logon script =
        logon path = \\%N\%U\profile
        logon drive =
        logon home = \\%N\%U
        domain logons = No
        os level = 2
        lm announce = Auto
        lm interval = 60
        preferred master = No
        local master = Yes
        domain master = No
        browse list = Yes
        dns proxy = Yes
        wins proxy = No
        wins server =
        wins support = No
        wins hook =
        kernel oplocks = No
        ole locking compatibility = Yes
        oplock break wait time = 10
        smbrun = /usr/bin/smbrun
        config file =
        auto services =
        lock directory = /var/lock/samba
        default service =
        message command =
        dfree command =
        valid chars =
        remote announce =
        remote browse sync =
        socket address = 0.0.0.0
        homedir map =
        time offset = 0
        unix realname = No
        NIS homedir = No
        source environment =
        panic action =
        comment =
        path =
        revalidate = No
        username =
        guest account = nobody
        invalid users =
        valid users =
        admin users =
        read list =
        write list =
        force user =
        force group =
        writeable = No
        create mask = 0744
        force create mode = 00
        security mask = -1
        force security mode = -1
        directory mask = 0755
        force directory mode = 00
        directory security mask = -1
        force directory security mode = -1
        inherit permissions = No
        guest only = No
        guest ok = No
        only user = No
        hosts allow = 192.168.1.
        hosts deny =
        status = Yes
        max connections = 0
        min print space = 0
        strict sync = No
        sync always = No
        write cache size = 0
        printable = No
        postscript = No
        printing = bsd
        print command = lpr -r -P%p %s
        lpq command = lpq -P%p
        lprm command = lprm -P%p %j
        lppause command =
        lpresume command =
        queuepause command =
        queueresume command =
        printer =
        printer driver = NULL
        printer driver location =
        default case = lower
        case sensitive = No
        preserve case = Yes
        short preserve case = Yes
        mangle case = No
        mangling char = ~
        hide dot files = Yes
        delete veto files = No
        veto files =
        hide files =
        veto oplock files =
        map system = No
        map hidden = No
        map archive = Yes
        mangled names = Yes
        mangled map =
        browseable = Yes
        blocking locks = Yes
        fake oplocks = No
        locking = Yes
        oplocks = Yes
        level2 oplocks = No
        oplock contention limit = 2
        strict locking = No
        share modes = Yes
        copy =
        include =
        preexec =
        preexec close = No
        postexec =
        root preexec =
        root preexec close = No
        root postexec =
        available = Yes
        volume =
        fstype = NTFS
        set directory = No
        wide links = Yes
        follow symlinks = Yes
        dont descend =
        magic script =
        magic output =
        delete readonly = No
        dos filetimes = No
        dos filetime resolution = No
        fake directory create times = No

[network-drive]
        comment = Network Drive
        path = /winmount
        writeable = Yes
        create mask = 0644
        guest ok = Yes

[printers]
        path = /var/spool/lpd/samba
        guest ok = Yes
        printable = Yes
        printing = lprng
        print command = /usr/bin/lpr  -U%U@%M -P%p -r %s
        lpq command = /usr/bin/lpq  -U%U@%M -P%p
        lprm command = /usr/bin/lprm -U%U@%M -P%p %j
        lppause command = /usr/sbin/lpc -U%U@%M hold %p %j
        lpresume command = /usr/sbin/lpc -U%U@%M release %p %j
        queuepause command = /usr/sbin/lpc -U%U@%M -P%p stop
        queueresume command = /usr/sbin/lpc -U%U@%M -P%p start

9. There is no such file as /etc/printers.def on my system. Is that problem?

10.

mail:~ # netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN
<cut>
udp        0      0 192.168.1.1:138         0.0.0.0:*
udp        0      0 192.168.1.1:137         0.0.0.0:*
udp        0      0 0.0.0.0:138             0.0.0.0:*
udp        0      0 0.0.0.0:137             0.0.0.0:*
<cut>

11. INTERESTING???

mail:~ # smbclient //mail/printers
added interface ip=192.168.1.1 bcast=192.168.1.255 nmask=255.255.255.0
session request to MAIL failed (Not listening for calling name)
session request to *SMBSERVER failed (Not listening for calling name)
mail:~ # date
Tue Dec 19 11:50:12 EST 2000

End of /var/log/samba-log.smb:

2000/12/19 11:50:09, 0] lib/access.c:check_access(262)
  Denied connection from mail.mydomain.com (198.x.x.x)
[2000/12/19 11:50:09, 1] smbd/process.c:process_smb(611)
  Connection denied from 198.x.x.x
[2000/12/19 11:50:09, 0] lib/access.c:check_access(262)
  Denied connection from mail.mydomain.com (198.x.x.x)
[2000/12/19 11:50:09, 1] smbd/process.c:process_smb(611)
  Connection denied from 198.x.x.x


If I solve this before X-mas I don't want any other gifts! =)

mk