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

From: Michael W Cocke (cocke_at_catherders.com)
Date: 07/18/04


Date: Sun, 18 Jul 2004 12:45:38 -0400

On Sun, 18 Jul 2004 15:32:40 GMT, Frnak McKenney
<frnak@far.from.the.madding.crowd.com> wrote:

[much snippage]

>> 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(;-)?

I saw an indication that you were trying to use it unsuccessfully. As
you point out further on in this post, you have since removed the
indication.

 
>> 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)

That's just the wildcarded form of my internal LAN addresses -
192.168.1*. You should have one for whatever internal address set
you're using.

>> 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'

Here's one problem. Remove the eth0 and add the wildcarded form of
your internal IP range. Since I use 192.168.1.1-254 I had 192.168.1.0

> 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.

It looks like you've made the common mistake of trying to interpret
IBMs non-docs as though they were written by any other company. When
IBM says something, it tends to not mean what a normal sane human
would take it to mean. They also document the really obscure options
and cases, while leaving the normal (in their opinion!) stuff as an
exercise for the user. Just for fun, I worked out once that a basic
functional OS/2 lan can be set up with ~20 lines of config options.
IBM uses 100+ in their docs and examples. Of course to be fair,
NETBEUI was invented to allow windows clients to use an OS/2 server.
There's a lot of glop in there that you don't need.

Tell you what - here's a smb.conf that an OS/2 system successfully
connects to -

# Samba config file created using SWAT
# from 192.168.1.2 (192.168.1.2)
# Date: 2004/06/25 12:36:31

# Global parameters
[global]
        workgroup = MWCE
        log file = /var/log/samba/log.%m
        max log size = 50
        socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192
        dns proxy = No
        ldap ssl = no
        default service = homes
        read only = No
        hosts allow = 192.168.1.
        printer name = N17
        printing = CUPS
         printcap name = CUPS
        security = user
        wins support = yes
        time server = yes
        name resolve order = wins bcast hosts

[homes]
        comment = Home Directories
        valid users = es, cocke, root, elliott
        write list = es, cocke, root, elliott

[sys]
        invalid users = elliott,@elliott
        browsable = yes
        path = /

[moose]
        invalid users = elliott
        path = /home/moose

[N17]
        path = /tmp
        printable = Yes
        path = /var/spool/samba
        printer admin = root
        use client driver = yes
        GUEST OK = YES

[print$]
        path = /var/lib/samba/drivers
        admin users = root, administrator
        write list = root

[Emoose]
        valid users = elliott,es,root,cocke
        read list = elliott
        path = /home/moose/Shared

### and here's an IBMLAN.INI that works - Note that there's a lot of
stuff left in here that isn't, strictly speaking, necessary - this
system used to do a bunch of other things but since I switched to
linux, all it does is run the cooling system in my office.. You can
omit the netbeui stuff - that was to connect to a bridged LAN that
doesn't exist anymore.

; OS/2 LAN Requester initialization file

[networks]

  net1 = NETBEUI$,0,LM10,34,100,14
  net2 = TCPBEUI$,1,LM10,34,100,14
; This information is read by the redirector at device initialization
time.

[requester]

; The following parameters generally do not need to be
; changed by the user.
  charcount = 16
  chartime = 250
  charwait = 3600
  keepconn = 600
  keepsearch = 600
  maxcmds = 16
  maxerrorlog = 100
  maxthreads = 10
  maxwrkcache = 64
  numalerts = 12
  numcharbuf = 10
  numservices = 7
  numworkbuf = 40
  numdgrambuf = 14
  othdomains =
  printbuftime = 90
  sesstimeout = 45
  sizcharbuf = 512
  sizerror = 1024
  sizworkbuf = 4096
; The wrkheuristics parameter sets a variety of requester fine-tuning
; options. Brief descriptions are provided here for each digit. More
; complete descriptions, along with explanations of relationships
between
; digits can be found in the LAN Server Network Administrator
Reference
; Volume 2: Performance Tuning.
;
; When not otherwise specified, a value of 0 means off (inactive) and
1 means
; on (active).
;
; 0 opportunistic locking of files (default is 1)
; 1 performance optimization for batch (.CMD) files (default is 1)
; 2 asynchronous unlock and asynchronous write-unlock
; 0 = never 2 = only on a LAN Server
virtual circuit
; 1 = always (default)
; 3 asynchronous close and asynchronous write-close
; 0 = never 2 = only on a LAN Server
virtual circuit
; 1 = always (default)
; 4 buffer all named pipes and serial devices (default is 1)
; 5 combined read-lock and write-unlock
; 0 = never 2 = only on a LAN Server
virtual circuit
; 1 = always (default)
; 6 open and read optimization (default is 1)
; 7 reserved
; 8 use of the chain-send NETBIOS NCB
; 0 = never
; 1 = when a server's buffer is larger than the workstations
buffer
; 2 = always (default)
; 9 buffer small read and write requests until the buffer is full
; 0 = never 2 = only on a LAN Server
virtual circuit
; 1 = always (default)
; 10 buffer mode
; 0 = always read buffer size amount of data if the request is
smaller
; than the buffer size (sizworkbuf) and data is being read
; sequentially
; 1 = use full buffer if file is open for reading and writing
; 2 = use full buffer if reading and writing sequentially
; 3 = buffer all requests smaller than the buffer size (if hits
occur)
; (default)
; 11 RAW read and RAW write SMB protocols (default is 1)
; 12 RAW read-ahead buffer (default is 1)
; 13 RAW write-behind buffer (default is 1)
; 14 read multiplexing SMB protocols (default is 1)
; 15 write multiplexing SMB protocols (default is 1)
; 16 use of big buffers for large core (non-RAW) reads (default is 1)
; 17 same-size read-ahead or read-to-sector boundary (default is 1)
; 18 same-size small record write-behind or write-to-sector boundary
; (default is 0)
; 19 reserved and must be 0
; 20 flush pipes and devices on a DosBufReset or DosClose operation
; 0 = Flush only files and devices opened by the caller. Spin
until
; flushed. Wait for confirmation before processing with
other
; tasks. (default)
; 1 = Flush only files and devices opened by the caller. Flush
only
; once. Do not wait for confirmation.
; 2 = Flush all files and all input and output of short-term
pipes
; and devices. Spin until flushed.
; 3 = Flush all files and all input and output of short-term
pipes
; and devices. Flush only once.
; 4 = Flush all files and all input and output of all pipes and
devices.
; Spin until flushed.
; 5 = Flush all files and all input and output of all pipes and
devices.
; Flush only once.
; 21 LAN Server encryption of passwords (default is 1)
; 22 control log entries for multiple occurrences of an error
; 0 = log all occurrences (default)
; 1-9 = limit occurrences that are logged (1-9 define size of
table
; that is used to track errors)
; 23 buffer all files opened with deny-write sharing mode (default is
1)
; 24 buffer all files opened with the read-only attribute set
(default is 1)
; 25 read ahead when opening for execution (default is 1)
; 26 handle the interrupt (ctrl+c) key
; 0 = allow no interrupts
; 1 = allow interrupts only on long-term operations
; 2 = always allow interrupts (default)
; 27 force correct open mode when creating files on a core server
(reserved
; for DBCS users) (default is 1)
; 28 NETBIOS NoAck mode
; 0 = NoAck is disabled.
; 1 = NoAck is set on send only. (default)
; 2 = NoAck is set on receive only.
; 3 = NoAck is set on send and receive.
; 29 send data along with SMB write-block RAW requests (default is 1)
; 30 send a message to the screen when the requester logs an error
; 0 = never
; 1 = on write-fault errors only (no time out) (default)
; 2 = on write-fault and internal errors only (no time out)
; 3 = on all errors (no time out)
; 4 = reserved
; 5 = on write-fault errors only (time out)
; 6 = on write-fault and internal errors only (time out)
; 7 = on all errors (time out)
; 8 = on all errors (time out) and pop up an error if a session
; to a server is abnormally disconnected
; 9 = on all errors (time out) and generate an INT24 (critical
; error) to applications running under DOS emulation if a
; network hard error is encountered
; 31 reserved
; 32 behavior of DosBufReset on a redirected file (not pipes or
devices).
; When the call to the API returns, the data in the buffer has
been
; handled as follows:
; 0 = Changed data in the buffer was sent from the requester to
the
; server. The server has written the data to disk.
; 1 = Changed data in the buffer was sent from the requester to
the
; server. The server has not yet written the data to disk.
; 2 = DosBufReset was ignored. (default)
; 33 time interval for performing logon validation from the domain
; controller
; 0 = 5 seconds 4 = 60 seconds 8 = 8
minutes
; 1 = 15 seconds (default) 5 = 90 seconds 9 = 15
minutes
; 2 = 30 seconds 6 = 2 minutes
; 3 = 45 seconds 7 = 4 minutes
; 34 date validation
; 0 = PCLP date format (default)
; 1 = MSNET date format
; 2 = assume date is correct
; 35 free disk space reported to DOS and Windows applications
; 0 = return true value (default)
; 1 = return a value less than two gigabytes
; 36 time and date synchronization with the domain controller at
logon
; (default is 1)
; 37 type of verification for the LAN Server logon
; 0 = no verification
; 1 = verify against local NET.ACC
; 2 = verify against domain NET.ACC (default)
; 38 display warning messages for the LAN Server logon
; 0 = do not display warning messages
; 1 = display all warning messages (default)
; 2 = do not display LAN Server specific warning messages
; 3 = display all warning messages, including password
expiration date
; 39 buffer all files opened in compatibility mode
; 0 = buffer only files opened for read access in compatibility
mode
; 1 = buffer all files opened in compatibility mode (default)
; 40 allow a user to logon multiple times in the same domain (default
is 1)
;
; The next lines help you to locate bits in the wrkheuristics entry.
; 1 2 3 4
; 0123456789012345678901234567890123456789012
  wrkheuristics = 1111111121311111110001011120111221001111100
  wrkservices = ,MESSENGER
  wrknets = net1,net2
  Computername = FRED
  Domain = MWCE

[messenger]

  logfile = messages.log
  sizmessbuf = 4096

[peer]

  auditing = resource
; The following parameters generally do not need to be
; changed by the user. NOTE : srvnets= is represented in
; the server info struct as a 16-bit lan mask. Srvnet names
; are converted to indexes within [networks] for the named nets.
  guestacct = guest
  autodisconnect = -1
  maxauditlog = 100
  maxchdevjob = 2
  maxchdevs = 1
  maxconnections = 26
  maxlocks = 64
  maxopens = 160
  maxsearches = 150
  maxsessopens = 80
  maxsessreqs = 25
  maxsessvcs = 1
  maxshares = 16
  maxusers = 15
  numbigbuf = 4
  numfiletasks = 1
  numreqbuf = 48
  sizreqbuf = 4096
  srvhidden = no
; The srvheuristics parameter sets a variety of server fine-tuning
; options. Brief descriptions are provided here for each digit. More
; complete descriptions, along with explanations of relationships
between
; digits can be found in the LAN Server Network Administrator
Reference
; Volume 2: Performance Tuning.
;
; When not otherwise specified, a value of 0 means off (inactive) and
1 means
; on (active).
;
; 0 opportunistic locking of files (default is 1)
; 1 read-ahead when the requester is performing sequential access
; 0 = do not use read-ahead
; 1 = use single read-ahead thread (default)
; 2 = use asynchronous read-ahead thread
; 2 write-behind (default is 1)
; 3 use of the chain-send NETBIOS NCB (default is 1)
; 4 check all incoming SMBs for correct format (default is 0)
; 5 support FCB opens (default is 1)
; 6 set priority of server (default is 4)
; 0-9 = 0 is highest priority, 9 is lowest priority
; 7 automatically allocate additional memory for directory searches
; (default is 1)
; 8 write records to the audit log only when the scavenger wakes up
; (default is 1)
; 9 do full buffering when a file is opened with deny-write sharing
mode
; (default is 1)
; 10 set the interval for the scavenger to wake up
; 0 = 5 seconds 4 = 25 seconds 8 = 45
seconds
; 1 = 10 seconds (default) 5 = 30 seconds 9 = 50
seconds
; 2 = 15 seconds 6 = 35 seconds
; 3 = 20 seconds 7 = 40 seconds
; 11 allow compatibility-mode opens of certain types of files by
translating
; them to sharing mode opens with deny-none
; 0 = Always use compatibility-mode opens.
; 1 = Use deny-none sharing mode if read-only access to .EXE or
.COM
; files.
; 2 = Use deny-none sharing mode if read-only access to .EXE or
.COM
; files. Use deny-write sharing mode if read-only access to
.BAT
; files is requested.
; 3 = Use deny-none sharing mode on all compatibility-mode
opens.
; (default)
; 12 allow DOS LAN Services workstations to use a second NETBIOS
session when
; sending printer requests (default is 1)
; 13 number of 64KB buffers used for read-ahead
; 0-9 = number of buffers (default is 1)
; 14 convert incoming path specifications into most basic format
(default is 0)
; 15 Oplock Timeout and NETBIOS Acknowledgment Timeout (default is 0)
; 0 = 35 second Oplock Timeout; 34 second NETBIOS Acknowledgment
Timeout
; 1 = 70 second Oplock Timeout; 69 second NETBIOS Acknowledgment
Timeout
; 2 = 140 second Oplock Timeout; 127 second NETBIOS
Acknowledgment Timeout
; 3 = 210 second Oplock Timeout; 127 second NETBIOS
Acknowledgment Timeout
; 4 = 280 second Oplock Timeout; 127 second NETBIOS
Acknowledgment Timeout
; 5 = 350 second Oplock Timeout; 127 second NETBIOS
Acknowledgment Timeout
; 6 = 420 second Oplock Timeout; 127 second NETBIOS
Acknowledgment Timeout
; 7 = 490 second Oplock Timeout; 127 second NETBIOS
Acknowledgment Timeout
; 8 = 560 second Oplock Timeout; 127 second NETBIOS
Acknowledgment Timeout
; 9 = 640 second Oplock Timeout; no NETBIOS Acknowledgment
Timeout
; 16 validate IOCTLs (default is 1)
; 17 how long the server maintains unused, dynamic big buffers before
freeing
; the memory.
; 0 = 0 seconds 4 = 5 minutes 8 = 1 hour
; 1 = 1 second 5 = 10 minutes 9 =
indefinitely
; 2 = 10 seconds 6 = 20 minutes
; 3 = 1 minute (default) 7 = 40 minutes
; 18 how long the server waits after failing to allocate a big buffer
before
; trying again.
; 0 = 0 seconds 3 = 1 minute (default)
; 1 = 1 second 4 = 5 minutes
; 2 = 10 seconds 5 = 10 minutes
; 19 RAW read and RAW write SMB protocols (default is 1)
; 20 server responds to announcement requests (default is 1)
;
; The next lines help you to locate bits in the srvheuristics entry.
; 1 2
; 012345678901234567890
  srvheuristics = 111101411113110013311
  SRVSERVICES =
  srvnets = NET1,net2

  SRVCOMMENT = Fred
[replicator]

  replicate = IMPORT
  importpath = C:\ibmlan\repl\import
  tryuser = yes
  password =

[services]

; Correlates name of service to pathname of service program.
; The pathname must be either
; 1) an absolute path (including the drive specification)
; OR
; 2) a path relative to the IBMLAN root
  messenger = services\msrvinit.exe
  peer = services\peerinit.exe
  replicator = services\replicat.exe
  requester = services\wksta.exe

>
>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.

I wouldn't have expected it to.

>...
>
>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.

Don't you just love plug & pray?

Seriously - something begins to smell a bit here... do you have
another cable & NIC you can put on the OS/2 system? and have you
fiddled with the nic driver parms on the OS/2 side? What else is on
the same IRQ as the NIC on the OS/2 system?

>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 (;-).

The story of modern computing in a nutshell:

Can't work. Doesn't work. THAT'S why it didn't work?!

Mike-

--
If you're not confused, you're not trying hard enough.
--
Please note - Due to the intense volume of spam, we have installed 
site-wide spam filters at catherders.com.  If email from you bounces,
try non-HTML, non-encoded, non-attachments,


Relevant Pages

  • Re: Samba HOWTO
    ... but I see no reason why eCS or Warp Server ... OS/2 LAN Requester initialization file ... 9 buffer small read and write requests until the buffer is full ... Acknowledgment Timeout ...
    (comp.os.linux.networking)
  • [NEWS] How to Remotely and Automatically Exploit a Format Bug
    ... Exploiting a format bug remotely is not as difficult as one would think. ... We will use very minimalist server along this paper. ... Since the buffer is directly available to a malicious user, ... Guessing the address of the shellcode in the stack ...
    (Securiteam)
  • [UNIX] Multiple Vulnerabilities in Citadel/UX
    ... could allow complete control over a vulnerable server. ... Citadel server as can be seen by this simplistic code snippet: ... configuration buffers, leading to the possibility of carrying out a buffer ... int connect_to_host; ...
    (Securiteam)
  • Re: Indirect synchronization setup with no synchronizers on servers
    ... Replica Manager to be installed at all. ... trust any LAN, except the LAN where the file server is that stores my ... remote PCs have synchronizers but the server does not. ... There is no difference between a synchronizer operating on replicas ...
    (microsoft.public.access.replication)
  • Re: Possible to secure WEP?
    ... It doesn't have to be a "server". ... this IP cannot be in the same class C IP block as your own LAN. ... To keep it simple, my gateway router, ... Ethernet adapter Local Area Connection: ...
    (alt.internet.wireless)