Slow initial access to samba shares

John N S Gill jng at
Fri Sep 22 10:13:22 GMT 2000

I have two linux boxes running samba and exporting shares to a bunch 
of NT machines.

I'm finding initial access to these machines is slow (it takes over a 
minute the first time you try and browse a share with Windows 

Actually, this isn't quite true, if the NT machine has just booted 
then access is pretty much instant.   However, if you then quit 
explorer and try an hour or so later then you get the one minute 
delay.   Also, once you have paid the 1 minute penalty to access the 
shares of one of the linux boxes you can see the shares of
the other one without a delay.

I suspect the problem is something to do with checks samba makes, when 
a machine first connects, to try and get the name of the host that is 
trying to connect.

In particular I suspect that it is trying to use DNS to look up the 
host name.   The NT hosts are not known to our DNS server and they 
are not in /etc/hosts on the linux machines.

I have name resolve order set as follows:

	name resolve order = wins lmhosts bcast hosts

and I have pointed samba at the wins server on our network.

I added one of the NT machines to /etc/hosts on one of the linux 
machines and access to that machine seems to be behaving ok (I say 
seems because this whole thing is a bit flaky to track down ..  so
although this NT machine has been behaving itself for the last day or 
so I can't be sure i have fixed the problem).   


  *  Is anyone else out there suffering from the same problem?
  *  Am I right to think DNS lookups are the problem?
  *  If so, how do I stop samba doing them + why is it doing them
     even though that is the last thing it should be trying?

Below is an extra from my samba logs showing the 1 minute delay in 

[2000/09/22 10:25:51, 3] smbd/ipc.c:api_fd_reply(3318)
  Got API command 0x26 on pipe "winreg" (pnum 7009)Doing \PIPE\winreg
[2000/09/22 10:25:51, 3] rpc_server/srv_pipe.c:api_rpcTNP(1088)
  api_rpcTNP: rpc command: REG_CLOSE
[2000/09/22 10:25:51, 3] rpc_server/srv_lsa_hnd.c:close_lsa_policy_hnd(298)
  Closed policy name pnum=1
[2000/09/22 10:26:51, 3] lib/doscalls.c:dos_ChDir(342)
  dos_ChDir to /root
[2000/09/22 10:26:51, 3] lib/doscalls.c:dos_ChDir(342)
  dos_ChDir to /root
[2000/09/22 10:30:04, 3] smbd/process.c:process_smb(618)
  Transaction 61 of length 4

I'd be most grateful for any help with this.


More information about the samba mailing list