Re: smbclient timeout, file truncated / 9.1 Pro (was Re: libpopt.so.0 conflict...

From: Frnak McKenney (frnak_at_far.from.the.madding.crowd.com)
Date: 07/18/04


Date: Sun, 18 Jul 2004 15:32:40 GMT


On Sat, 17 Jul 2004 00:09:10 -0400, Michael W Cocke <cocke@catherders.com> wrote:
> On Sat, 17 Jul 2004 02:50:30 GMT, Frnak McKenney
><frnak@far.from.the.madding.crowd.com> wrote:
--snip--
>>After some experimenting (and some customer work, and a week in
>>beautiful Hudsonian Selkirk, New York to see my niece Chiara
>>graduate) I'm convinced that I can reliably _read_ files from
>>NETBIOS-shared OS/2 drives through smbclient, and I can display the
>>directories of the drive, but I can't _write_ files to these drives.
>>It appears that the initial creation of the file succeeds, but then
>>further writes are timed out. The result is that the file gets
>>created on the SHAREd drive, but it has no data (0 bytes).
>>
>>When I use smbclient to 'print' to a SHAREd printer, an empty file
>>is briefly spooled by OS/2, but it disappears after 20 seconds.
>>
>>Samba works just fine going the other way. I'm sharing several of
>>my directories on 'manticore' (SuSE Linux 9.1 Pro) _back_ to OS/2
>>via "NET USE", but I can't figure out how to make manticore access
>>drives or printers SHAREd out by OS/2 Peer.
>>
>>All of this is taking place on a small LAN consisting of the
>>following machines:
>>
>> 192.168.0.1 office OS/2 Warp 4.0
>> 192.168.0.2 manticore SuSE Linux Pro 9.1
--snip--
> [much snipped]
  [ Thank you (;-) ]

Mike,

Thanks for taking the time to respond.

> Frank, I wish you had posted this before you cane up north, we could
> have met and run thru this a lot faster in person. You have several
> problems.

Only some of which are discussed here (;-).
 
> 1) You aren't using WINS, please unconfigure it.

Um... I'm having trouble parsing this (not enough tea, or not
strong enough this early in the morning?). If you're telling me I'm
not using a WINS server, you're right -- there are only the Linux
and the OS/2 machines on the LAN. If you're recommending its use,
well, I suppose I could activate the 'winbindd' daemon, which is
currently not in use. And if you mean that you _see_ some
indication in my (admittedly lengthy) DEBUG output that I have a
WINS server running on this LAN somewhere, could you help me find it
and stomp it before it multiplies(;-)?
 
> 2) Take a look here -
> http://www.catherders.com/Notebook-Mike/tcpbeui.html

I did -- thanks. I _did_ add both my hosts to MPTS' NETBIOS Names
list, but the problem was still present afterwards. By the way, I
notice your 'web page shows an entry there for an IP address of
'192.168.1.0', but with no associated NETBIOS name. Is this
important? (I don't have one)
 
> Step by step instructions on setting up file sharing between linux and
> OS/2. You need to adjust several timing settings, as well as the
> protocol level - the default is incorrect.

Other relevancies (FYI):

  IBMLAN.INI: (no chanes required)
     srvhidden = no
     maxconnections = 128
     maxshares = 64

  NET VIEW:
    \\MANTICORE SAMBA SERVER ON 'MANTICORE'

  NET USE (trimmed):

    OK R: \\MANTICORE\FRANK
    OK T: \\MANTICORE\GRANTSCONNECT
    OK W: \\MANTICORE\WORK

  NET ACCESS (trimmed):

    G: ( Audited )
          *GUESTS:RWCXDAP *USERS:RWCXDAP
          GUEST:RWCXDA

    \PRINT\STYLUSC8 ( Audited )
          *GUESTS:C *USERS:C

  NET SHARE:

    IPC$ Remote IPC
    ADMIN$ C:\IBMLAN Remote Admin
    CDRIVE C:\
    GDRIVE G:\ OS/2 G: drive
    HPDESKJE COM4 Spooled
    STYLUSC8 LPT1 Spooled Epson Sytlus C84

On the Linux end, here are selected entries from smb.conf:

[global]
        workgroup = IBMPEERS
        server string = Samba Server on 'manticore'

        interfaces = 127.0.0.1, eth*
# I've now changed that to just 'eth0'

        bind interfaces only = Yes
        security = SHARE
        encrypt passwords = No
        map to guest = Bad User
        smb ports = 139

        protocol = LANMAN2
# ...was 'NT1'

        max protocol = LANMAN2

        name resolve order = lmhosts host bcast
# ...dropped wins, reordered.

        max disk size = 500

        preferred master = No
# ...was 'auto'

        local master = No
        domain master = No

Unfortunately, even with all these changes, the problem (timeout
when writing via smbclient) persisted.

I did run across one oddity. One Usenet posting mentioned the
'nmblookup' program, so I through I'd give it a try:

frank@manticore:~> nmblookup -S MANTICORE
querying MANTICORE on 127.255.255.255
192.168.0.2 MANTICORE<00>
Looking up status of 192.168.0.2
        MANTICORE <00> - B <ACTIVE>
        MANTICORE <03> - B <ACTIVE>
        MANTICORE <20> - B <ACTIVE>
        IBMPEERS <00> - <GROUP> B <ACTIVE>
        IBMPEERS <1e> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00

O-oookay. Fair enough, if an odd MAC address, but look at this
next:

frank@manticore:~> nmblookup -S office
querying office on 127.255.255.255
querying office on 192.168.0.255
4.152.84.205 office<00>
Looking up status of 4.152.84.205
Packet send failed to 4.152.84.205(137) ERRNO=Network is unreachable

        MAC Address = D0-DB-2C-40-20-E5
        MAC Address = D0-DB-2C-40-20-E5

Ack! Phhhhlbbbbt!!! There _is_ a CIA tap on my LAN!!

After I calmed down a bit (;-) I added 'office' and 'manticore' to
/etc/samba/lmhosts, which only had one entry for 'localhost'.
Things look much, _much_ better now (;-).

frank@manticore:~> nmblookup -S OFFICE
querying OFFICE on 127.255.255.255
querying OFFICE on 192.168.0.255
192.168.0.1 OFFICE<00>
Looking up status of 192.168.0.1
        OFFICE <00> - B <ACTIVE>
        OFFICE <03> - B <ACTIVE>
        IBMPEERS <00> - <GROUP> B <ACTIVE>
        OFFICE <20> - B <ACTIVE>
        FRANK <03> - B <ACTIVE>

        MAC Address = 00-00-C0-A8-00-01

Unfortunately, the smbclient timeout persists. I think I'll try
shutting everything down and re-IPLing both boxes. Probably won't
fix anything, but it couldn't hurt... unless it tries to boot from
the CIA Punch Card Reader hiding out there on the LAN...

Hm. YaST2's hardware info says I have two NICs onboard, and the p;d
3Com 3c595 100BaseTX [Vortex] is unconfigured and has no cable
attached. ... Nope, configuring it didn't make any difference.

...

Powering down manticore and pulling the 3c595 adapter somehow messed
up something -- manticore nmblookup couldn't find OFFICE -- but
rebooting the OS/2 machine seems to have cleared _that_ up, but I'm
still getting timeouts. And wondering about manticore's nmblookup
MAC address of all-zeroes.

Sigh.

> After you get file sharing working, ...

Ah, I love an optimist! (;-)

> ... drop me an email and I'll see if I
> can get your printer up. Likely it will be already - you solve the
> basic SMB stuff and it should all fall in line.

This seems reasonable. Now if I can just get past this leetle
timeout problem writing from Samba to OS/2 Peer... I know that,
once we find it, it'll seem incredibly simple and stupid, but that's
Afterwards, and this is Now (;-).

> --
> If you're not confused, you're not trying hard enough.

Based on this, I'm trying ex_treme_ly hard. Or maybe just _being_
very trying -- sometimes it's hard to tell the difference (;-)

Thanks for the help.

Frank McKenney, McKenney Associates
Richmond, Virginia / (804) 320-4887
Munged E-mail: frank uscore mckenney ayut minds pring dawt cahm (y'all)