A couple of questions

Tony Mobily merc at mobily.com
Mon Jul 3 14:48:04 GMT 2000


Hi guys,

First of all, thanks for your great work. So many people *need* Samba to
work...!

I have a couple of questions about Samba. I have been fiddeling with Samba
config files for some time now (as well as reading documentation about
it), and... there must be something I am missing.

The network I am managing has a very, very standard configuration.
It's a C class (netmask: 255.255.255.0), let's call it x.y,z,w.

There is a PDC, PHOENIX, with IP x.y.z.155.
Now, I have two different scenarios.

1) BEFORE RUNNING SAMBA
-----------------------

I run:

[root at cooee /root]# findsmb

IP ADDR         NETBIOS NAME   WORKGROUP/OS/VERSION
---------------------------------------------------------------------
203.25.173.130  SLINKSVILLE    [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.133  BHARRIS        [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.134  TREVOR         [HADES]
203.25.173.137  AKRAM          [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.138  KENOATH        [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.139  PRINCESS       [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.145  GUARDIAN       [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.146  DAVID          [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.147  JOSE           [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.148  SLINKIES       [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.149  NOVA           [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.155  PHOENIX       *[HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.156  BROCHE         [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.157  NORMAN         [HADES] [Windows NT 4.0] [NT LAN Manager]
203.25.173.160  LEE            [HADES] [Windows NT 4.0] [NT LAN Manager]
[root at cooee /root]#

Ant that's brilliant. I understand that the "findsmb" script only runs the
commands:

nmblookup -r -A $IP
smbclient -N -L <NAME> -I <IP ADDRESS> -U%

So, if I run:

[root at cooee /root]# nmblookup -r -A 203.25.173.157
Looking up status of 203.25.173.157
received 5 names
        NORMAN          <00> -         M <ACTIVE>
        HADES           <00> - <GROUP> M <ACTIVE>
        NORMAN          <03> -         M <ACTIVE>
        NORMAN          <20> -         M <ACTIVE>
        HADES           <1e> - <GROUP> M <ACTIVE>
num_good_sends=0 num_good_receives=0

[root at cooee /root]#

Everything seems perfectly fine.

[root at cooee /root]# smbclient -N -L NORMAN -I 203.25.173.157 -U%
added interface ip=203.25.173.1 bcast=203.25.173.255 nmask=255.255.255.0
Domain=[HADES] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]

        Sharename      Type      Comment
        ---------      ----      -------
Error returning browse list: ERRDOS - ERRnoaccess (Access denied.)

        Server               Comment
        ---------            -------

        Workgroup            Master

Again, everything seems to be OK.


2) AFTER RUNNING SAMBA
-----------------------

Well, at this point, the problems start.
The program "findsmb" takes ages to run, and the result is (surprisingly)
dirrerent:

[root at cooee /root]# findsmb

IP ADDR         NETBIOS NAME   WORKGROUP/OS/VERSION
---------------------------------------------------------------------
203.25.173.1    cooee
203.25.173.130  pc130.cybersydney.com.au
203.25.173.133  pc133.cybersydney.com.au
203.25.173.134  pc134.cybersydney.com.au
203.25.173.137  pc137.cybersydney.com.au
203.25.173.138  pc138.cybersydney.com.au
203.25.173.139  pc139.cybersydney.com.au
203.25.173.145  pc145.cybersydney.com.au
203.25.173.146  pc146.cybersydney.com.au
203.25.173.147  pc147.cybersydney.com.au
203.25.173.148  pc148.cybersydney.com.au
203.25.173.149  nova.cybersydney.com.au
203.25.173.155  pc155.cybersydney.com.au
203.25.173.156  pc156.cybersydney.com.au
203.25.173.157  pc157.cybersydney.com.au
203.25.173.160  pc160.cybersydney.com.au
[root at cooee /root]#

It's very odd: Why is the looked up hostname there, instead of the NETBIOS
names? 

Now, this is what happens when I try to run *exactly* the same commands I
mentioned earlier (that are, what "findsmb" runs to look up information):

[root at cooee /root]# nmblookup -r -A 203.25.173.157
Looking up status of 203.25.173.157
No status response (this is not unusual)

[root at cooee /root]#

...and:

[root at cooee /root]# smbclient -N -L NORMAN -I 203.25.173.157 -U%
added interface ip=203.25.173.1 bcast=203.25.173.255 nmask=255.255.255.0
Domain=[HADES] OS=[Windows NT 4.0] Server=[NT LAN Manager 4.0]

        Sharename      Type      Comment
        ---------      ----      -------
Error returning browse list: ERRDOS - ERRnoaccess (Access denied.)

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
[root at cooee /root]#

The second command looks fine, but... so, it is the lookup that is
behaving a bit funny (well... is it?).


CONCLUSIONS
-----------

Here are my questions:

1)
I think this lookup problem (if there is a problem) might be releated to
the fact that when a client clicks on "cooee" in the "Network
Neighborhood", it takes at least five seconds to have a directory listing
coming up. Is that correct? If not, do you have any ideas about what is
causing the delay to happen?

2)
Can you see any major problem is the configuration attached below? (I
stripped all the "#" comments...) My knowledge of SMB is quite narrow (I
only read the documents in the "texd_doc" directory, and...)

I apologise if this email is rather pathetic from a technical point of
view, and I would strongly appreciate any help.

THANKS!

(my smb.conf file follows)

#======================= Global Settings =====================================
[global]
   workgroup = HADES
   server string = COOEE FILE SERVER

;   hosts allow = 192.168.1. 192.168.2. 127.

   printcap name = /etc/printcap
   load printers = yes

;   printing = bsd

;guest account = pcguest

   log file = /var/log/samba/log.%m

   max log size = 0

   # NOTE: we have a NT machine that keeps all the passwords
   security = server
   password server = PHOENIX

;  password level = 8
;  username level = 8

;encrypt passwords = yes
;smb passwd file = /etc/smbpasswd

;  unix password sync = Yes
;  passwd program = /usr/bin/passwd %u
;  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

;  username map = /etc/smbusers

;   include = /etc/smb.conf.%m

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

;   interfaces = 192.168.12.2/24 192.168.13.2/24 

;   remote browse sync = 192.168.3.25 192.168.5.255
;   remote announce = 192.168.1.255 192.168.2.44

   local master = no

;   os level = 33

;   domain master = yes 

;   preferred master = yes

; domain controller = PHOENIX

;   domain logons = yes

;   logon script = %m.bat
;   logon script = %U.bat
;   logon path = \\%L\Profiles\%U
; name resolve order = wins lmhosts bcast

;   wins support = yes

# Phoenix is a wins server...
#
wins server = 203.25.173.155

;   wins proxy = yes

   dns proxy = no 

;  preserve case = no
;  short preserve case = no
;  default case = lower
;  case sensitive = no

[ ALL THE BORING SHARE CONFIGURATION FOLLOWS, I DON'T THINK IT MATTERS ]


Merc.

----------------------------------------------------------------------
Tony Merc Mobily, technical editor of "Dev." and "Login"
Linuxpapers.org coordinator http://www.linuxpapers.org
Technical Writer
Personal Phone Number: ++61-8-93355105, +8 GMT, +7 from Italy!
Currently located in: PERTH, Australia
merc at squiz.net - mobily at infomedia.it




More information about the samba mailing list