There seems to be a problem in the samba classicupgrade script (update.py). Migrating from a samba3 (initially even samba2) domain I get the following output: samba-tool domain classicupgrade --dbdir=/root/samba-classicupgrade-pups --realm=xxx.xxx.xxx --dns-backend=SAMBA_INTERNAL /root/samba-classicupgrade-pups/smb.conf Reading smb.conf Provisioning Exporting account policy Exporting groups Exporting users Next rid = 21109 Failed to connect to ldap URL 'ldap://xxx.xxx.xxx.xxx' - LDAP client internal error: NT_STATUS_BAD_NETWORK_NAME Failed to connect to 'ldap://xxx.xxx.xxx.xxx' with backend 'ldap': LDAP client internal error: NT_STATUS_BAD_NETWORK_NAME ERROR(<class 'samba.provision.ProvisioningError'>): uncaught exception - ProvisioningError: Could not open ldb connection to ldap://xxx.xxx.xxx.xxx, the error message is: (1, 'LDAP client internal error: NT_STATUS_BAD_NETWORK_NAME') File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 176, in _run return self.run(*args, **kwargs) File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/domain.py", line 1589, in run useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs) File "/usr/local/samba/lib64/python2.7/site-packages/samba/upgrade.py", line 669, in upgrade_from_samba3 raise ProvisioningError("Could not open ldb connection to %s, the error message is: %s" % (url, e)) The script gets problem with this line (around line number 669): ldb_object = Ldb(url, credentials=creds) url here in my case contains 'ldap://xxx.xxx.xxx.xxx' The directive in the old smb.conf was accordingly: passdb backend = ldapsam:"ldap://xxx.xxx.xxx.xxx" When I insert (as a short test) url='xxx.xxx.xxx.xxx' as line 669, I get the problem solved. My feeling is that the script is disturbed by the 'ldap://' prefix of the IP address but I'm not enough into samba LDB to decide.