When trying to do a classic upgrade from samba3 nt4 style domain to samba 4 AD we are getting the following error from samba-tool command: ....... Next rid = 15625 Exporting posix attributes ERROR(<type 'exceptions.TypeError'>): uncaught exception - __init__() takes exactly 2 arguments (5 given) 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 1321, in run useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs) File "/usr/lib/python2.7/dist-packages/samba/upgrade.py", line 811, in upgrade_from_samba3 homes[username] = get_posix_attr_from_ldap_backend(logger, ldb_object, base_dn, username, "homeDirectory") File "/usr/lib/python2.7/dist-packages/samba/upgrade.py", line 542, in get_posix_attr_from_ldap_backend raise ProvisioningError("Failed to retrieve attribute %s for user %s, the error is: %s", attr, user, e) Andrew indicated that this is a simply typo bug that needs to be fixed and after that, the script would indicate the actual error being hit. Tested with: Samba 3.5.x with an openldap backend. various versions of Debian and Samba4 (4.1.17 - 4.2.3) but samba-tool crashes with the above each time. Thanks Cain
Created attachment 11331 [details] patch for master
Created attachment 11332 [details] my verson of upgrade.py
(In reply to Andrew Bartlett from comment #1) Hi Andrew, no dice. Not sure what upgrade.py you are working with but mine looks a little different. First off the def get_posix_attr_from_ldap_backend method is on line 530 and not 407 as indicated in the patch file. Also the def is completely different see attached version. However after looking at the patch file I manually edited the line being changed and now the error just includes the braces - see below: ....... Next rid = 15625 Exporting posix attributes ERROR(<type 'exceptions.TypeError'>): uncaught exception - __init__() takes exactly 2 arguments (5 given) 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 1321, in run useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs) File "/usr/lib/python2.7/dist-packages/samba/upgrade.py", line 811, in upgrade_from_samba3 homes[username] = get_posix_attr_from_ldap_backend(logger, ldb_object, base_dn, username, "homeDirectory") File "/usr/lib/python2.7/dist-packages/samba/upgrade.py", line 542, in get_posix_attr_from_ldap_backend raise ProvisioningError("Failed to retrieve attribute %s for user %s, the error is: %s", (attr, user, e)) Andrew indicated that this is a simply typo bug that needs to be fixed and after that, the script would indicate the actual error being hit. Tested with: Samba 3.5.x with an openldap backend. various versions of Debian and Samba4 (4.1.17 - 4.2.3) but samba-tool crashes with the above each time. Thanks Cain
Created attachment 11335 [details] 4.3 patch cherry-picked from master The attached patch is the cherry-pick from master to 4.3rc2
The patch may apply back to older versions of Samba, but I'm mostly interested in getting this cosmetic fix sorted out for 4.3 and above, perhaps 4.2 if it happens to apply and isn't much trouble for the release team. Please try again with Samba 4.3rc or apply it to 4.2. The original patch I submitted still contained a syntax error, the new patch should be correct.
Pushed to autobuild-v4-3-test
Pushed to v4-3-test
Thanks team - sorted. After applying the patch I found three malformed dn's in our LDAP DB. Current status is upgraded to Samba4 **WOOT**