[Samba] Samba4 on Ubuntu 12.04 won't join existing domain

Sven Tegethoff tegethoff at udobaer.de
Thu Nov 22 00:55:52 MST 2012

On 21.11.2012 19:31, Rowland Penny wrote:
> On 21/11/12 17:52, pccom frank wrote:
>> root at u1204:/etc# /usr/local/samba/bin/samba-tool domain join 
>> delltest.pccom.ca DC -Uadministrator --realm=delltest.pccom.caFinding 
>> a writeable DC for domain 'delltest.pccom.ca'Found DC 
>> dell2008.delltest.pccom.caPassword for 
>> [WORKGROUP\administrator]:Failed to bind - LDAP client internal 
>> error: NT_STATUS_INVALID_PARAMETERFailed to connect to 
>> 'ldap://dell2008.delltest.pccom.ca' with backend 'ldap': 
>> (null)ERROR(ldb): uncaught exception - None  File 
>> "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/__init__.py", 
>> line 175, in _run    return self.run(*args, **kwargs)  File 
>> "/usr/local/samba/lib/python2.7/site-packages/samba/netcmd/domain.py", line 
>> 552, in run    machinepass=machinepass, use_ntvfs=use_ntvfs, 
>> dns_backend=dns_backend)  File 
>> "/usr/local/samba/lib/python2.7/site-packages/samba/join.py", line 
>> 1082, in join_DC    machinepass, use_ntvfs, dns_backend, 
>> promote_existing)  File 
>> "/usr/local/samba/lib/python2.7/site-packages/samba/join.py", line 
>> 78, in __init__    cr
> ed
>>   entials=ctx.creds, lp=ctx.lp)  File 
>> "/usr/local/samba/lib/python2.7/site-packages/samba/samdb.py", line 
>> 56, in __init__    options=options)  File 
>> "/usr/local/samba/lib/python2.7/site-packages/samba/__init__.py", 
>> line 114, in __init__    self.connect(url, flags, options)  File 
>> "/usr/local/samba/lib/python2.7/site-packages/samba/samdb.py", line 
>> 71, in connect    options=options)root at u1204:/etc# uname -aLinux 
>> u1204 3.2.0-33-generic #52-Ubuntu SMP Thu Oct 18 16:29:15 UTC 2012 
>> x86_64 x86_64 x86_64 GNU/Linux
>> /usr/local/samba/sbin/samba --versionVersion 4.1.0pre1-GIT-d6983f4
>> It has no problem to create a new domain and allow XP to join it.
>> Your help will be appreciated.
> Hi, have you provisioned the samba4 server? does 
> /usr/local/samba/etc/smb.conf exist?

When you try to join a domain as domain controller, the join command 
replaces the provisioning step - and in fact you should delete your 
smb.conf before you do it, because it will be re-created during the join.

I agree with the original poster that "uncaught exception - None" is not 
exactly a helpful error message. But since it's the initial bind to the 
domain controllers LDAP that fails, I'd guess that it's a permission 
problem on the other server's side or a problem with network connectivity.

I would try including the administrator password on the join command 
line: -Uadministrator%password ... I'm not sure if sambatool will 
actually ask if you don't give it the password right away. What you 
could also try is checking with a generic ldap client if the other 
domain controller will actually let you connect at all to its ldap server.

Best Regards,


More information about the samba mailing list