---
root@ubuntu-ad-3:~# kinit administrator
Password for <email address hidden>:
Warning: Your password will expire in 40 days on Thu 28 Aug 2014 05:56:10 PM UTC
---
---
root@ubuntu-ad-3:~# samba-tool domain join central.domain.com.br DC -Uadministrator --realm=CENTRAL.DOMAIN.COM.BR --dns-backend=BIND9_DLZ
Finding a writeable DC for domain 'central.domain.com.br'
ERROR(exception): uncaught exception - Failed to find a writeable DC for domain 'central.domain.com.br'
File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
return self.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 552, in run
machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)
File "/usr/lib/python2.7/dist-packages/samba/join.py", line 1150, in join_DC
machinepass, use_ntvfs, dns_backend, promote_existing)
File "/usr/lib/python2.7/dist-packages/samba/join.py", line 76, in __init__
ctx.server = ctx.find_dc(domain)
File "/usr/lib/python2.7/dist-packages/samba/join.py", line 262, in find_dc
raise Exception("Failed to find a writeable DC for domain '%s'" % domain)
---
Debugging it with `strace`, I'm seeing:
---
strace -f -e trace=network samba-tool domain join CENTRAL.DOMAIN.COM.BR DC -Uadministrator --realm=CENTRAL.DOMAIN.COM.BR --dns-backend=BIND9_DLZ
.....
[pid 1533] +++ killed by SIGKILL +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=1533, si_status=SIGKILL, si_utime=0, si_stime=0} ---
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 5
setsockopt(5, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
connect(5, {sa_family=AF_INET6, sin6_port=htons(389), inet_pton(AF_INET6, "2001:1291:XXX:85Xa::66XX", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
ERROR(exception): uncaught exception - Failed to find a writeable DC for domain 'CENTRAL.DOMAIN.COM.BR'
File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run
return self.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line 552, in run
machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)
File "/usr/lib/python2.7/dist-packages/samba/join.py", line 1150, in join_DC
machinepass, use_ntvfs, dns_backend, promote_existing)
File "/usr/lib/python2.7/dist-packages/samba/join.py", line 76, in __init__
ctx.server = ctx.find_dc(domain)
File "/usr/lib/python2.7/dist-packages/samba/join.py", line 262, in find_dc
raise Exception("Failed to find a writeable DC for domain '%s'" % domain)
+++ exited with 255 +++
---
So, how can I force samba-tool to use IPv4? Since ubuntu-ad-3 doesn't have IPv6...
Guys,
I'm facing this problem too: /lists. samba.org/ archive/ samba/2013- March/172230. html
https:/
NOTE: I just posted this message on Samba maillist but, this seems to be a BUG, so, I'm opening it here too.
The problem is: samba-tool must use IPv6 ONLY IF the machine have IPv6.
I have two Samba4 AC DC, in both located in my office, dual-stacked, working like a charm.
Now, I need to deploy a third DC, located within Amazon EC2, which does NOT have IPv6.
But, samba-tool fails to join.
How can I workaround this, without enabling a tunneled IPv6 within my EC2 ?
Exemplifying:
1- ubuntu-ad-1 - Master - ok - office LAN1 - IPv4 / IPv6
2- ubuntu-ad-2 - Slave - ok - office LAN2 - IPv4 / IPv6
3- ubuntu-ad-3 - Slave can't join - AWS - IPv4-Only
---
root@ubuntu-ad-3:~# kinit administrator
Password for <email address hidden>:
Warning: Your password will expire in 40 days on Thu 28 Aug 2014 05:56:10 PM UTC
---
--- domain. com.br DC -Uadministrator --realm= CENTRAL. DOMAIN. COM.BR --dns-backend= BIND9_DLZ domain. com.br' domain. com.br' python2. 7/dist- packages/ samba/netcmd/ __init_ _.py", line 175, in _run python2. 7/dist- packages/ samba/netcmd/ domain. py", line 552, in run =machinepass, use_ntvfs= use_ntvfs, dns_backend= dns_backend) python2. 7/dist- packages/ samba/join. py", line 1150, in join_DC python2. 7/dist- packages/ samba/join. py", line 76, in __init__ python2. 7/dist- packages/ samba/join. py", line 262, in find_dc
root@ubuntu-ad-3:~# samba-tool domain join central.
Finding a writeable DC for domain 'central.
ERROR(exception): uncaught exception - Failed to find a writeable DC for domain 'central.
File "/usr/lib/
return self.run(*args, **kwargs)
File "/usr/lib/
machinepass
File "/usr/lib/
machinepass, use_ntvfs, dns_backend, promote_existing)
File "/usr/lib/
ctx.server = ctx.find_dc(domain)
File "/usr/lib/
raise Exception("Failed to find a writeable DC for domain '%s'" % domain)
---
Debugging it with `strace`, I'm seeing:
--- DOMAIN. COM.BR DC -Uadministrator --realm= CENTRAL. DOMAIN. COM.BR --dns-backend= BIND9_DLZ AF_INET6, sin6_port= htons(389) , inet_pton(AF_INET6, "2001:1291: XXX:85Xa: :66XX", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable) DOMAIN. COM.BR' python2. 7/dist- packages/ samba/netcmd/ __init_ _.py", line 175, in _run python2. 7/dist- packages/ samba/netcmd/ domain. py", line 552, in run =machinepass, use_ntvfs= use_ntvfs, dns_backend= dns_backend) python2. 7/dist- packages/ samba/join. py", line 1150, in join_DC python2. 7/dist- packages/ samba/join. py", line 76, in __init__ python2. 7/dist- packages/ samba/join. py", line 262, in find_dc
strace -f -e trace=network samba-tool domain join CENTRAL.
.....
[pid 1533] +++ killed by SIGKILL +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=1533, si_status=SIGKILL, si_utime=0, si_stime=0} ---
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 5
setsockopt(5, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
connect(5, {sa_family=
ERROR(exception): uncaught exception - Failed to find a writeable DC for domain 'CENTRAL.
File "/usr/lib/
return self.run(*args, **kwargs)
File "/usr/lib/
machinepass
File "/usr/lib/
machinepass, use_ntvfs, dns_backend, promote_existing)
File "/usr/lib/
ctx.server = ctx.find_dc(domain)
File "/usr/lib/
raise Exception("Failed to find a writeable DC for domain '%s'" % domain)
+++ exited with 255 +++
---
So, how can I force samba-tool to use IPv4? Since ubuntu-ad-3 doesn't have IPv6...
Thanks!
Thiago