[Samba] Joining a Samba DC to a Windows AD
Rowland penny
rpenny at samba.org
Sun Jun 23 17:01:49 UTC 2019
On 23/06/2019 17:36, Marcio Demetrio Bacci wrote:
> There was an error when I tried to join Samba 4 in the domain, as below:
>
> root at samba4dc:~# samba-tool domain join empresa.com.br
> <http://empresa.com.br> DC -U"EMPRESA\administrator"
> INFO 2019-06-23 12:48:22,189 pid:728
> /usr/local/samba/lib/python3.5/site-packages/samba/join.py #103:
> Finding a writeable DC for domain 'empresa.com.br <http://empresa.com.br>'
> INFO 2019-06-23 12:48:22,198 pid:728
> /usr/local/samba/lib/python3.5/site-packages/samba/join.py #105: Found
> DC windc2.empresa.com.br <http://windc2.empresa.com.br>
> Password for [EMPRESA\administrator]:
> INFO 2019-06-23 12:48:33,708 pid:728
> /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1519:
> workgroup is EMPRESA
> INFO 2019-06-23 12:48:33,708 pid:728
> /usr/local/samba/lib/python3.5/site-packages/samba/join.py #1522:
> realm is empresa.com.br <http://empresa.com.br>
> Adding CN=SAMBA4DC,OU=Domain Controllers,DC=empresa,DC=com,DC=br
> Adding
> CN=SAMBA4DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=empresa,DC=com,DC=br
> Adding CN=NTDS
> Settings,CN=SAMBA4DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=empresa,DC=com,DC=br
> Join failed - cleaning up
> Deleted CN=SAMBA4DC,OU=Domain Controllers,DC=empresa,DC=com,DC=br
> Deleted CN=NTDS
> Settings,CN=SAMBA4DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=empresa,DC=com,DC=br
> Deleted
> CN=SAMBA4DC,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=empresa,DC=com,DC=br
> ERROR(ldb): uncaught exception - LDAP error 10 LDAP_REFERRAL -
> <0000202B: RefErr: DSID-030A0AEB, data 0, 1 access points
> ref 1:
> 'd580939f-a8b9-43ea-84e9-be0f9bd29468._msdcs.empresa.com.br
> <http://msdcs.empresa.com.br>'
> > <ldap://d580939f-a8b9-43ea-84e9-be0f9bd29468._msdcs.empresa.com.br
> <http://msdcs.empresa.com.br>>
> File
> "/usr/local/samba/lib/python3.5/site-packages/samba/netcmd/__init__.py",
> line 185, in _run
> return self.run(*args, **kwargs)
> File
> "/usr/local/samba/lib/python3.5/site-packages/samba/netcmd/domain.py",
> line 699, in run
> backend_store=backend_store)
> File "/usr/local/samba/lib/python3.5/site-packages/samba/join.py",
> line 1535, in join_DC
> ctx.do_join()
> File "/usr/local/samba/lib/python3.5/site-packages/samba/join.py",
> line 1427, in do_join
> ctx.join_add_objects()
> File "/usr/local/samba/lib/python3.5/site-packages/samba/join.py",
> line 698, in join_add_objects
> ctx.samdb.modify(m)
>
You seem to have installed krb5-kdc, you do not need this unless you are
compiling Samba yourself with MIT, but this is not recommended because
it is marked as experimental.
You also have a line '127.0.1.1' in /etc/hosts pointing to your hosts
info, you should remove this and whatever is also running on port 53
Can I ask, are you trying to join an existing Samba AD DC to the Windows
domain ?
Rowland
More information about the samba
mailing list