SOLVED RE: [Samba] XP can browse samba by IP, but not by name - NMB issues?

Joe joe at trianglesports.com
Sun Jan 4 18:46:40 GMT 2004


Man is it hard to solve a problem when you're looking in the wrong place.

My samba is fine (though now I understand it a lot better from having
fiddled with so many settings).

My problem was more basic networking. The samba Linux box (hoth) is
also a dhcp server, and gives addresses on 10.0.0.x to all the 
Windows machines in my house. It was configured incorrectly (in
/etc/dhcpd.conf) to give out a netmask of 255.0.0.0 instead of 
255.255.255.0. I changed that netmask to 255.255.255.0 and forced
all of my clients to release renew (c:\ipconfig \release and 
C:\ipconfig \renew) and VIOLA!

I figured this out by watching packets using ethereal on a
Windows box, finding that hoth (samba) was sending out 
broadcasts "I'm here!", but that no one was really doing much
in the way of replying... Not sure if they are supposed to
or not, but it got me thinking on why that might be and
I got to the dhcp issue.

Hope this helps someone...
Joe
 

> -----Original Message-----
> From: samba-bounces+joe=trianglesports.com at lists.samba.org 
> [mailto:samba-bounces+joe=trianglesports.com at lists.samba.org] 
> On Behalf Of Joe
> Sent: Sunday, January 04, 2004 12:02 PM
> To: samba at lists.samba.org
> Subject: RE: [Samba] XP can browse samba by IP, but not by 
> name - NMB issues?
> 
> Sorry, samba version is smbd version 2.2.7a-security-rollup-fix
> 
> > -----Original Message-----
> > From: samba-bounces+joe=trianglesports.com at lists.samba.org
> > [mailto:samba-bounces+joe=trianglesports.com at lists.samba.org]
> > On Behalf Of Joe
> > Sent: Sunday, January 04, 2004 11:40 AM
> > To: samba at lists.samba.org
> > Subject: [Samba] XP can browse samba by IP, but not by name - NMB 
> > issues?
> > 
> > 
> > I have an XP home (falcon) and an XP pro (tatooine) machine, both 
> > behind a rh9 box (hoth) acting as firewall. I've been trying to get 
> > samba set up on the linux box. I think I have it mostly 
> working except 
> > that the XP boxes won't list hoth under "My Network Places 
> - Microsoft 
> > Windows Network - MSHOME", and I cannot access hoth by name at all 
> > from the XP-pro box (by IP, I can access). So I suppose I have nmb 
> > isssues...?
> > 
> > >From hoth (rh9):
> > 
> > ***************************************************
> > [root at hoth samba]# smbclient -L tatooine added interface 
> ip=10.0.0.1 
> > bcast=10.0.0.255 nmask=255.255.255.0
> > Password: 
> > Domain=[MSHOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
> > 
> >         Sharename      Type      Comment
> >         ---------      ----      -------
> >         My Documents   Disk      
> >         IPC$           IPC       Remote IPC
> >         ADMIN$         Disk      Remote Admin
> >         C$             Disk      Default share
> > 
> >         Server               Comment
> >         ---------            -------
> >         FALCON               Falcon
> >         TATOOINE             
> > 
> >         Workgroup            Master
> >         ---------            -------
> >         MSHOME               FALCON
> > 
> > [root at hoth samba]# smbclient -L falcon added interface ip=10.0.0.1 
> > bcast=10.0.0.255 nmask=255.255.255.0
> > Password: 
> > Domain=[MSHOME] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
> > 
> >         Sharename      Type      Comment
> >         ---------      ----      -------
> >         My Documents   Disk      
> >         IPC$           IPC       Remote IPC
> >         Shared         Disk      
> > 
> >         Server               Comment
> >         ---------            -------
> >         FALCON               Falcon
> >         TATOOINE             
> > 
> >         Workgroup            Master
> >         ---------            -------
> >         MSHOME               FALCON
> > ***************************************************
> > 
> > but from an xp box (falcon xp-home):
> > 
> > ***************************************************
> > c:\net view
> > Server Name        Remark
> > ----------------------------------------------
> > \\FALCON           Falcon
> > \\TATOOINE         
> > The command completed successfully.
> > 
> > c:\\net view hoth
> > Shared resources at hoth
> > Hoth rh9
> > Share name    Type   Used as   Comment
> > ------------------------------------------------
> > joe           Disk   (UNC)     joe-home
> > Music         Disk   (UNC)     Hoth Music
> > The command completed successfully.
> > ***************************************************
> > 
> > ... so falcon (xp-home) manages to see hoth by name, but 
> doesn't list 
> > it in MSHOME while browsing. Tatooine (xp-pro) doesn't see 
> it by name 
> > (start-run \\hoth yields "The network path was not found")
> > 
> > hoth, after starting smb, eventually gives up on finding a master 
> > browser and decides to be one itself. log.nmbd shows:
> > 
> > ***************************************************
> > [2004/01/04 10:11:46, 2]
> > nmbd/nmbd_elections.c:check_for_master_browser_fail(106)
> >   check_for_master_browser_fail: Forcing election on 
> workgroup MSHOME 
> > subnet 10.0.0.1 [2004/01/04 10:11:57, 2]
> > nmbd/nmbd_elections.c:send_election_dgram(43)
> >   send_election_dgram: Sending election packet for 
> workgroup MSHOME on 
> > subnet 10.0.0.1 [2004/01/04 10:11:59, 2]
> > nmbd/nmbd_elections.c:send_election_dgram(43)
> >   send_election_dgram: Sending election packet for 
> workgroup MSHOME on 
> > subnet 10.0.0.1 [2004/01/04 10:12:01, 2]
> > nmbd/nmbd_elections.c:send_election_dgram(43)
> >   send_election_dgram: Sending election packet for 
> workgroup MSHOME on 
> > subnet 10.0.0.1 [2004/01/04 10:12:03, 2]
> > nmbd/nmbd_elections.c:send_election_dgram(43)
> >   send_election_dgram: Sending election packet for 
> workgroup MSHOME on 
> > subnet 10.0.0.1 [2004/01/04 10:12:05, 2]
> > nmbd/nmbd_elections.c:send_election_dgram(43)
> >   send_election_dgram: Sending election packet for 
> workgroup MSHOME on 
> > subnet 10.0.0.1 [2004/01/04 10:12:05, 2]
> > nmbd/nmbd_elections.c:run_elections(208)
> >   run_elections: >>> Won election for workgroup MSHOME on subnet 
> > 10.0.0.1 <<< [2004/01/04 10:12:05, 2]
> > nmbd/nmbd_become_lmb.c:become_local_master_browser(549)
> >   become_local_master_browser: Starting to become a master 
> browser for 
> > workgroup MSHOME on subnet 10.0.0.1 [2004/01/04 10:12:13, 0]
> > nmbd/nmbd_become_lmb.c:become_local_master_stage2(404)
> >   *****
> >   
> >   Samba name server HOTH is now a local master browser for 
> workgroup 
> > MSHOME on subnet 10.0.0.1
> >   
> >   *****
> > ***************************************************
> > 
> > ... and my smb.conf:
> > 
> > ***************************************************
> > # Global parameters
> > [global]
> >         workgroup = MSHOME
> >         netbios name = hoth
> >         server string = Hoth rh9
> >         interfaces = 10.0.0.1/255.255.255.0
> >         security = user
> >         encrypt passwords = yes
> >         username map = /etc/samba/smbusers
> >         smb passwd file = /etc/samba/smbpasswd
> >         log level= 2
> >         debug level = 2
> >         log file = /var/log/samba/log.%m
> >         max log size = 50
> >         socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=16384
> >         dns proxy = No
> >         browseable = yes
> > 
> > [Music]
> >         comment = Hoth Music
> >         browseable = yes
> >         path = /var/music
> >         writeable = yes
> >         guest ok = yes
> > 
> > [joe]
> >         comment = joe-home
> >         path = /home/joe
> >         guest ok = yes
> > 
> > ***************************************************
> > 
> > I do run a firewall on the samba machine, which was my best 
> suspicion 
> > at first, but I now think looks ok (I've only a passable 
> knowledge of 
> > iptables):
> > 
> > ***************************************************
> > [root at hoth samba]# iptables -L
> > Chain INPUT (policy DROP)
> > target     prot opt source               destination         
> > ACCEPT     all  --  anywhere             anywhere           
> > ACCEPT     all  --  10.0.0.0/24          anywhere           
> > drop-and-log-it  all  --  10.0.0.0/24          anywhere           
> > ACCEPT     tcp  --  anywhere             anywhere           tcp
> > dpt:ftp-data 
> > ACCEPT     tcp  --  anywhere             anywhere           
> > tcp dpt:ftp 
> > ACCEPT     tcp  --  anywhere             anywhere           
> > tcp dpt:ssh 
> > ACCEPT     tcp  --  anywhere             anywhere           
> > tcp dpt:http
> > 
> > ACCEPT     udp  --  anywhere             anywhere           udp
> > dpts:netbios-ns:netbios-ssn 
> > ACCEPT     tcp  --  anywhere             anywhere           tcp
> > dpts:netbios-ns:netbios-ssn 
> > ACCEPT     tcp  --  anywhere             anywhere           
> > tcp dpt:imap
> > 
> > ACCEPT     tcp  --  anywhere             anywhere           
> > tcp dpt:5901
> > 
> > ACCEPT     tcp  --  anywhere             anywhere           
> > tcp dpt:5902
> > 
> > ACCEPT     all  --  anywhere
> > client200-122.dsl.intrex.netstate RELATED,ESTABLISHED 
> > drop-and-log-it  all  --  anywhere             anywhere           
> > 
> > Chain FORWARD (policy DROP)
> > target     prot opt source               destination         
> > ACCEPT     all  --  anywhere             anywhere           state
> > RELATED,ESTABLISHED 
> > ACCEPT     all  --  anywhere             anywhere           
> > drop-and-log-it  all  --  anywhere             anywhere           
> > 
> > Chain OUTPUT (policy DROP)
> > target     prot opt source               destination         
> > ACCEPT     all  --  anywhere             anywhere           
> > ACCEPT     all  --  client200-122.dsl.intrex.net  
> 10.0.0.0/24        
> > ACCEPT     all  --  10.0.0.0/24          10.0.0.0/24        
> > drop-and-log-it  all  --  anywhere             10.0.0.0/24        
> > ACCEPT     udp  --  anywhere             anywhere           udp
> > spts:netbios-ns:netbios-ssn 
> > ACCEPT     tcp  --  anywhere             anywhere           tcp
> > spt:netbios-ssn 
> > ACCEPT     all  --  client200-122.dsl.intrex.net  anywhere  
>          
> > drop-and-log-it  all  --  anywhere             anywhere           
> > 
> > Chain drop-and-log-it (5 references)
> > target     prot opt source               destination         
> > LOG        all  --  anywhere             anywhere           
> LOG level
> > info 
> > REJECT     all  --  anywhere             anywhere           
> > reject-with
> > icmp-port-unreachable
> > 
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  http://lists.samba.org/mailman/listinfo/samba
> > 
> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
> 



More information about the samba mailing list