[Samba] Problems with a trust relation between samba and samba different subnet

Andre Fonseca de Oliveira andre.f.oliveira at cgu.gov.br
Fri Jan 21 08:45:25 MST 2011


I have successfully created trust relationships with Samba 3.3.8 on 
CentOS 5.5.

My /etc/samba/lmhosts file looks like on both PDCs looks similar to the 
following:

127.0.0.1 localhost

10.208.7.198    server1.domain.br#20
10.208.7.198    server1#20
10.208.7.198    df-cgu#1b
10.208.7.198    df-cgu#1c

10.208.38.2     server2.domain.br#20
10.208.38.2     server2#20
10.208.38.2     ac-cgu#1b
10.208.38.2     ac-cgu#1c

where server1 is the PDC for domain df-cgu and server2 is the PDC for 
domain AC-CGU

Hope this helps.

On 01/21/2011 01:25 PM, Alberto Moreno wrote:
> Hi, well once u try  lot and no good result is time to ask.
>
> My friends I want to make to domains running samba+ldap to share
> resources, I want to create a trust relation in two directions. Both
> domains have wins enable but are on different subnet.
>
> Domain Name: DOM1    Netbios Name = DOM1PDC 192.168.50.0/24
> Domain Name: DOM2    Netbios Name = DOM2PDC 192.168.40.0/24
>
> Both networks are separate, each one with his own switch, a FW is what
> help me they can communicate.
>
> OS: Centos 5.5
> Samba 3.3.x.
>
> First, I follow the instructions from the bible of samba and say that
> I need to create the Interdomain account on each network:
>
> smbldap-useradd -a -i DOMAIN-NAME
>
> Done.
>
> smbldap-usershow I have the I flag on each account.
>
> I have enable the ports in my fw to communicate both domainsm done.
>
> Now went I run the command:
>
> net rpc trustdom establish DOM1   on PDC DOM2 I got the error
>
> net rpc trustdom establish DOM1  running on PDC DOM2
>
> [2011/01/21 07:17:16,  0] libsmb/namequery.c:internal_resolve_name(1609)
>    resolve_name: unknown name switch type lmhost
> [2011/01/21 07:17:16,  0] utils/net_rpc.c:rpc_trustdom_establish(5565)
>    Couldn't find domain controller for domain DOM1
>
> Some search pages point me that in this case I need to setup the file
> lmhosts to make this happen because no service is helping my PDC to
> reach the other end, I read the MS KB where it say how to setup a
> LMHOSTS and have this
> on my PDC DOM2:
>
> 127.0.0.1 localhost
> 192.168.50.3 "DOM1       \0x1b" #PRE
> 192.168.50.3 DOM1PDC #PRE #DOM:DOM1
>
> on DOM1 I have
>
> 192.168.40.3 "DOM2       \0x1b" #PRE
> 192.168.40.3 DOM2PDC #PRE #DOM:DOM2
>
> In samba smb.conf I have:
>
> hosts allow = 192.168.40. 192.168.50. 127.
> name resolve order = wins hosts bcast lmhost
>
> nsswitch have the line:
>
> hosts:      files wins dns
>
> I try again and in DOM1 PDC:
>
> net rpc trustdom establish DOM2
>
> [2011/01/21 07:22:13,  0] libsmb/namequery.c:internal_resolve_name(1609)
>    resolve_name: unknown name switch type lmhost
> [2011/01/21 07:22:13,  0] utils/net_rpc.c:rpc_trustdom_establish(5565)
>    Couldn't find domain controller for domain DOM2
>
> There is something I forget to setup or what I'm doing wrong, hope
> some could give some tips and point my errors, I will appreciated,
> thanks!!!
>


More information about the samba mailing list