[Samba] samba browsing through subnets with different nethoods

Fernando Torrez fernando_torrez at hotmail.com
Mon Aug 27 14:24:30 MDT 2012


Hi everybody

    I installed 2 subnets, one with a samba PDC fully functional and the other with just
    one linux client (called CLIENTE) with samba running a basic configuration.
    
    Subnet 1 has a samba PDC called BAR (domain FOOBAR with ip 192.168.1.1) that is also the wins 
    server for both subnets and the domain master browser for 192.168.1.0/24
    
bar:/var/log/samba # smbclient -L bar -N
Anonymous login successful
Domain=[FOOBAR] OS=[Unix] Server=[Samba 3.4.2-2.1-2229-SUSE-CODE11]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (bar)
        print$          Disk      Printer Drivers
        Documents       Disk      share to test samba
        sysvol          Disk
Anonymous login successful
Domain=[FOOBAR] OS=[Unix] Server=[Samba 3.4.2-2.1-2229-SUSE-CODE11]

        Server               Comment
        ---------            -------
        BAR                  bar

        Workgroup            Master
        ---------            -------
        FOOBAR               BAR
    
    Subnet 2 has only a basic funcional samba client (called CLIENTE with IP 192.168.20.2) joined to BAGOLIN workgroup (there's no domain controller)
    that is configured to share directories. Its important to say that CLIENTE is configured to use the wins server that BAR
    offers on subnet 1 (and also CLIENTE is the Local Master Browser for 192.168.20.0/24).

cliente:/var/log/samba # smbclient -L cliente -N
Anonymous login successful
Domain=[BAGOLIN] OS=[Unix] Server=[Samba 3.6.3-34.12.1-2797-SUSE-SL12.1-i386]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (CLIENTE)
        Plans           Disk      All users
Anonymous login successful
Domain=[BAGOLIN] OS=[Unix] Server=[Samba 3.6.3-34.12.1-2797-SUSE-SL12.1-i386]

        Server               Comment
        ---------            -------
        CLIENTE              CLIENTE

        Workgroup            Master
        ---------            -------
        BAGOLIN              CLIENTE

    These 2 subnets are joined with 3 routers as can be seen:
    
    SUBNET 1 (BAR PDC)===192.168.1.0/24===(Router 1)===10.0.0.0/24===(Router 2)===11.0.0.0/24===(Router 3)===192.168.20.0/24===(CLIENTE)      SUBNET 2
    
    I made sure that both subnets can be seen each other with no restrictions (disabled iptables, static routing implementation)
    
    My purpuse is that both subnets can share their browsing lists so I can access any shared 
    directory (using any windows workstation) available from both subnets.
    
    I added these options to BAR smb.conf file
            remote announce = 192.168.20.2/FOOBAR
            remote browse sync = 192.168.20.2
            #added earlier
            wins support = Yes     
            
    and these options to CLIENTE smb.conf file
            remote announce = 192.168.1.1/BAGOLIN
            remote browse sync = 192.168.1.1
              wins server = 192.168.1.1
              local master = yes
              preferred master = yes

hoping that both samba services can exchange their browse lists, but unfortunately
the CLIENTE server is still getting only its own browse list meanwhile BAR only gets
the nethood name:

bar:/var/log/samba # smbclient -L bar -N
Anonymous login successful
Domain=[FOOBAR] OS=[Unix] Server=[Samba 3.4.2-2.1-2229-SUSE-CODE11]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (bar)
        print$          Disk      Printer Drivers
        Documents       Disk      share to test samba
        sysvol          Disk
Anonymous login successful
Domain=[FOOBAR] OS=[Unix] Server=[Samba 3.4.2-2.1-2229-SUSE-CODE11]

        Server               Comment
        ---------            -------
        BAR                  bar

        Workgroup            Master
        ---------            -------
        BAGOLIN              CLIENTE
        FOOBAR               BAR

if I join a windows workstations to subnet 1 (where BAR PDC belongs) y can see both 
nethoods (FOOBAR and BAGOLIN) but I can't see any computer on BAGOLIN nethood (at 
least should be CLIENTE showing there).
I can ping and even access cliente shares using \\CLIENTE\myshare\ from either subnets

looking logs I only could get these lines:

BAR LOGS
[2012/08/24 11:31:02,  3] nmbd/nmbd_incomingdgrams.c:378(process_master_browser_announce)
  process_master_browser_announce: Local master announce from CLIENTE IP 192.168.20.2.
[2012/08/24 11:31:02,  3] nmbd/nmbd_browserdb.c:118(create_browser_in_lmb_cache)
nmbd_browserdb:create_browser_in_lmb_cache()
  Added lmb cache entry for workgroup FOOBAR name CLIENTE IP 192.168.20.2 ttl 1345823282
[2012/08/24 11:32:32,  2] nmbd/nmbd_browsesync.c:60(sync_with_lmb)
  sync_with_lmb:
  Initiating sync with local master browser CLIENTE<0x20> at IP 192.168.20.2 for workgroup FOOBAR
[2012/08/24 11:32:32,  2] nmbd/nmbd_synclists.c:184(sync_browse_lists)
  Initiating browse sync for FOOBAR to CLIENTE(192.168.20.2)
[2012/08/24 11:32:32,  3] lib/util_sock.c:1033(open_socket_out_send)
  Connecting to 192.168.20.2 at port 139
[2012/08/24 11:32:32,  2] nmbd/nmbd_synclists.c:302(complete_sync)
  sync with CLIENTE(192.168.20.2) for workgroup FOOBAR completed (1 records)
  
......
  [2012/08/24 11:47:56,  2] nmbd/nmbd_synclists.c:302(complete_sync)
    sync with CLIENTE(0.0.0.0) for workgroup BAGOLIN completed (1 records)
  [2012/08/24 11:48:05,  3] nmbd/nmbd_winsserver.c:859(wins_process_name_refresh_request)
    wins_process_name_refresh_request: Name refresh for name BAGOLIN<1e> IP 192.168.20.2
  [2012/08/24 11:48:05,  3] nmbd/nmbd_winsserver.c:859(wins_process_name_refresh_request)
    wins_process_name_refresh_request: Name refresh for name BAGOLIN<00> IP 192.168.20.2
  [2012/08/24 11:48:05,  3] nmbd/nmbd_serverlistdb.c:423(write_browse_list)
    write_browse_list: Wrote browse list into file /var/lib/samba/browse.dat
  [2012/08/24 11:48:05,  3] nmbd/nmbd_winsserver.c:859(wins_process_name_refresh_request)
    wins_process_name_refresh_request: Name refresh for name CLIENTE<00> IP 192.168.20.2
  [2012/08/24 11:48:05,  3] nmbd/nmbd_winsserver.c:859(wins_process_name_refresh_request)
    wins_process_name_refresh_request: Name refresh for name CLIENTE<03> IP 192.168.20.2
  [2012/08/24 11:48:05,  3] nmbd/nmbd_winsserver.c:859(wins_process_name_refresh_request)
    wins_process_name_refresh_request: Name refresh for name CLIENTE<20> IP 192.168.20.2
  [2012/08/24 11:48:45,  3] nmbd/nmbd_sendannounce.c:165(send_local_master_announcement)
    send_local_master_announcement: type 849b2b for name BAR on subnet 192.168.1.1 for workgroup FOOBAR
  [2012/08/24 11:48:45,  3] nmbd/nmbd_sendannounce.c:184(send_workgroup_announcement)
    send_workgroup_announcement: on subnet 192.168.1.1 for workgroup FOOBAR
  [2012/08/24 11:48:45,  3] nmbd/nmbd_sendannounce.c:165(send_local_master_announcement)
    send_local_master_announcement: type 8c9b2b for name BAR on subnet 127.0.0.2 for workgroup FOOBAR
  [2012/08/24 11:48:45,  3] nmbd/nmbd_sendannounce.c:184(send_workgroup_announcement)
    send_workgroup_announcement: on subnet 127.0.0.2 for workgroup FOOBAR
  [2012/08/24 11:49:15,  3] nmbd/nmbd_incomingdgrams.c:378(process_master_browser_announce)
    process_master_browser_announce: Local master announce from CLIENTE IP 192.168.20.2.
  [2012/08/24 11:51:56,  3] nmbd/nmbd_winsserver.c:1918(wins_process_name_query_request)
    wins_process_name_query: name query for name CLIENTE<20> from IP 192.168.20.2
  [2012/08/24 11:51:56,  3] nmbd/nmbd_winsserver.c:1970(wins_process_name_query_request)
    wins_process_name_query: name query for name CLIENTE<20> returning first IP 192.168.20.2.
  [2012/08/24 11:52:09,  3] nmbd/nmbd_winsserver.c:1918(wins_process_name_query_request)
    wins_process_name_query: name query for name BAR<20> from IP 127.0.0.1
  [2012/08/24 11:52:09,  3] nmbd/nmbd_winsserver.c:1970(wins_process_name_query_request)
    wins_process_name_query: name query for name BAR<20> returning first IP 192.168.1.1.
  [2012/08/24 11:52:29,  3] nmbd/nmbd_incomingdgrams.c:378(process_master_browser_announce)
    process_master_browser_announce: Local master announce from CLIENTE IP 192.168.20.2.
  [2012/08/24 11:52:59,  3] nmbd/nmbd_browsesync.c:668(sync_all_dmbs)
    Initiating DMB<->DMB sync with CLIENTE(0.0.0.0)
  [2012/08/24 11:52:59,  2] nmbd/nmbd_synclists.c:184(sync_browse_lists)
    Initiating browse sync for BAGOLIN to CLIENTE(0.0.0.0)
  [2012/08/24 11:52:59,  3] lib/util_sock.c:1033(open_socket_out_send)
    Connecting to 192.168.20.2 at port 139
  [2012/08/24 11:52:59,  2] nmbd/nmbd_synclists.c:302(complete_sync)
    sync with CLIENTE(0.0.0.0) for workgroup BAGOLIN completed (1 records)
  [2012/08/24 11:53:19,  3] nmbd/nmbd_serverlistdb.c:423(write_browse_list)
  write_browse_list: Wrote browse list into file /var/lib/samba/browse.dat

as can be seen, BAR seems to get browse list from CLIENTE, but only 1 record

Meanwhile CLIENTE samba logs looks like this:
    become_local_master_browser: Starting to become a master browser for workgroup BAGOLIN on subnet 192.168.20.2
  [2012/08/24 11:28:09,  3] nmbd/nmbd_become_lmb.c:540(become_local_master_browser)
    become_local_master_browser: first stage - attempt to register ^1^2__MSBROWSE__^2^1
  .....
  *****
  
  Samba name server CLIENTE is now a local master browser for workgroup BAGOLIN on subnet 192.168.20.2
  
  *****
......

  process_master_browser_announce: Local master announce from BAR IP 192.168.1.1.
[2012/08/24 11:31:02,  0] nmbd/nmbd_incomingdgrams.c:385(process_master_browser_announce)
  process_master_browser_announce: Not configured as domain master - ignoring master announce.
[2012/08/24 11:33:32,  3] nmbd/nmbd_sendannounce.c:167(send_local_master_announcement)
  send_local_master_announcement: type 849a03 for name CLIENTE on subnet 192.168.20.2 for workgroup BAGOLIN
[2012/08/24 11:33:32,  3] nmbd/nmbd_sendannounce.c:186(send_workgroup_announcement)
  send_workgroup_announcement: on subnet 192.168.20.2 for workgroup BAGOLIN
[2012/08/24 11:34:08,  3] nmbd/nmbd_incomingdgrams.c:381(process_master_browser_announce)
  process_master_browser_announce: Local master announce from BAR IP 192.168.1.1.
[2012/08/24 11:34:08,  0] nmbd/nmbd_incomingdgrams.c:385(process_master_browser_announce)
  process_master_browser_announce: Not configured as domain master - ignoring master announce.
[2012/08/24 11:37:08,  3] nmbd/nmbd_incomingdgrams.c:381(process_master_browser_announce)
  process_master_browser_announce: Local master announce from BAR IP 192.168.1.1.
[2012/08/24 11:37:08,  0] nmbd/nmbd_incomingdgrams.c:385(process_master_browser_announce)
  process_master_browser_announce: Not configured as domain master - ignoring master announce.
[2012/08/24 11:37:38,  3] nmbd/nmbd_sendannounce.c:167(send_local_master_announcement)
  send_local_master_announcement: type 849a03 for name CLIENTE on subnet 192.168.20.2 for workgroup BAGOLIN
[2012/08/24 11:37:38,  3] nmbd/nmbd_sendannounce.c:186(send_workgroup_announcement)
  send_workgroup_announcement: on subnet 192.168.20.2 for workgroup BAGOLIN
[2012/08/24 11:40:14,  3] nmbd/nmbd_incomingdgrams.c:381(process_master_browser_announce)
  process_master_browser_announce: Local master announce from BAR IP 192.168.1.1.
[2012/08/24 11:40:14,  0] nmbd/nmbd_incomingdgrams.c:385(process_master_browser_announce)
  process_master_browser_announce: Not configured as domain master - ignoring master announce.
    .....
  
[2012/08/24 12:04:26,  3] nmbd/nmbd_incomingdgrams.c:381(process_master_browser_announce)
  process_master_browser_announce: Local master announce from BAR IP 192.168.1.1.
[2012/08/24 12:04:26,  0] nmbd/nmbd_incomingdgrams.c:385(process_master_browser_announce)
  process_master_browser_announce: Not configured as domain master - ignoring master announce.
[2012/08/24 12:07:35,  3] nmbd/nmbd_incomingdgrams.c:381(process_master_browser_announce)
  process_master_browser_announce: Local master announce from BAR IP 192.168.1.1.
[2012/08/24 12:07:35,  0] nmbd/nmbd_incomingdgrams.c:385(process_master_browser_announce)
  process_master_browser_announce: Not configured as domain master - ignoring master announce.
[2012/08/24 12:10:35,  3] nmbd/nmbd_incomingdgrams.c:381(process_master_browser_announce)
  process_master_browser_announce: Local master announce from BAR IP 192.168.1.1.
[2012/08/24 12:10:35,  0] nmbd/nmbd_incomingdgrams.c:385(process_master_browser_announce)
  process_master_browser_announce: Not configured as domain master - ignoring master announce.

as can be seen, CLIENTE is rejecting any attempt to share data with BAR.

I read "Samba how to","samba by example" and google various sites with no luck.
I'm stuck here, Any tip to solve this problem?

Can samba servers (either Domain master browser or local master browser) share their browse and nethood lists
along each other through subnets?

thanks in advanced for any suggestions?

    Fernando Torrez





lines below are software details used and complete smb.conf of both servers.

BAR server
-opensuse 11.1
-samba 3.4.2-2.1
-openldap2-2.4.12.5.5.1

CLIENTE server
-opensuse 12.1
-samba 3.6.3-34.12.1


    BAR smb.conf file
[global]
        unix charset = utf8
        workgroup = FOOBAR
        server string = bar
        netbios name = bar
        interfaces = eth1, lo
        remote announce = 192.168.20.2/FOOBAR
        remote browse sync = 192.168.20.2
        bind interfaces only = Yes
        passdb backend = ldapsam:ldap://bar.foobar.tld
        username map = /etc/samba/smbusers
        log level = 3
        syslog = 0
        log file = /var/log/samba/%m
        max log size = 50
        smb ports = 139
        name resolve order = wins bcast hosts
        time server = Yes
        printcap name = CUPS
        show add printer wizard = No
        ldap ssl = no
        ldap delete dn = Yes
        add user script = /usr/sbin/smbldap-useradd -m "%u"
        delete user script = /usr/sbin/smbldap-userdel "%u"
        add group script = /usr/sbin/smbldap-groupadd -p "%g"
        delete group script = /usr/sbin/smbldap-groupdel "%g"
        add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
        delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
        set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
        add machine script = /usr/sbin/smbldap-useradd -w "%u"
        logon script = logon.bat
        logon home =
        logon path =
        #logon path = \\%L\profiles\%u
        logon drive = H:
        domain logons = Yes
        domain master = Yes
        #local master = Yes
        security = user
        preferred master = Yes
        os level = 65
        wins support = Yes
        wins proxy = Yes
        ldap admin dn = cn=Manager,dc=foobar,dc=tld
        ldap group suffix = ou=Groups
        ldap idmap suffix = ou=Idmap
        ldap machine suffix = ou=Computers
        ldap suffix = dc=foobar,dc=tld
        ldap user suffix = ou=Users
        idmap backend = ldap:ldap://bar.foobar.tld
        idmap uid = 10000-20000
        idmap gid = 10000-20000
        winbind enum users = yes
        winbind enum groups = yes
        map acl inherit = Yes

[homes]
        comment = Home Directories
        valid users = %S
        read only = No
        browseable = No
        inherit acls = Yes
        create mask = 0600
        directory mask = 0700

[printers]
        comment = SMB Print Spool
        path = /var/spool/samba
        guest ok = Yes
        printable = Yes
        browseable = No

[sysvol]
        path = /data/samba/sysvol
        read only = no

[netlogon]
        comment = Network Logon Service
        #path = /var/lib/samba/netlogon
        guest ok = Yes
        path = /data/samba/sysvol/foobar.tld/scripts
        writeable = yes
        browseable = no
        read only = no
        locking = No

[profiles]
        path = /data/samba/profiles
        #force user = %u
        writeable = yes
        browseable = no
        read only = no
        #store dos attributes = Yes
        create mode = 0777
        directory mode = 0777
        guest ok = Yes
        profile acls = Yes
        csc policy = disable

[Documents]
        comment = share to test samba
        path = /data/documents
        writeable = yes
        browseable = yes
        read only = no
        valid users = "@Domain Users"
        #valid users = "@grupo3"
        inherit permissions = Yes
        inherit acls = Yes

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = root, chrisr



    CLIENTE smb.conf file:

[global]
        workgroup = BAGOLIN
        server string = CLIENTE
        interfaces = eth0, lo
        bind interfaces only = Yes
        name resolve order = wins hosts bcast
        #wins support = yes
        wins server = 192.168.1.1
        local master = yes
        preferred master = yes
        os level = 64
        log file = /var/log/samba/%m
        remote announce = 192.168.1.1/BAGOLIN
        remote browse sync = 192.168.1.1
        log level = 3
        domain master = no

[Plans]
        comment = All users
        path = /plans
        read only = No
        guest ok = Yes
    

 		 	   		  


More information about the samba mailing list