Hi All, Following the link, tried to migrate NT4 to AD using LDAP but came across some issues. https://wiki.samba.org/index.php/Migrating_a_Samba_NT4_Domain_to_Samba_AD_(Classic_Upgrade) I have done this step multiple times using TDB as the backend and it has always worked. The issue I am seeing is when I run the following, we get samba-tool domain classicupgrade --dbdir=/var/lib/samba.PDC/dbdir --realm=LIN.GROUP --dns-backend=SAMBA_INTERNAL /etc/samba.PDC/smb.PDC.conf Next rid = 10003 ERROR(<type 'exceptions.IndexError'>): uncaught exception - list index out of range 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 1460, in run useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs) File "/usr/lib/python2.7/dist-packages/samba/upgrade.py", line 664, in upgrade_from_samba3 urls = samba3.lp.get("passdb backend").split(":",1)[1].strip('"') I'm running the upgrade on PDC (LDAP) server . local master = yes domain master = yes preferred master = yes domain logons = yes os level = 65 #LDAP passdb backend = ldapsam ldap admin dn = cn=admin,dc=lin ldap suffix = dc=lin ldap group suffix = ou=groups ldap machine suffix = ou=computers ldap user suffix = ou=users idmap backend = ldap ldap idmap suffix = ou=idmap idmap config *: backend = ldap idmap config *: range = 10000-19990 idmap config *: ldap_url = ldap://lin-pdc.lin/ (Also tried //localhost) idmap config *: ldap_base_dn = ou=idmap,dc=lin idmap config *: ldap_user_dn = cn=admin,dc=lin ldap delete dn = yes ldap password sync = yes The only thing I can think of is when running the smbldap-popluate we used the following, smbldap-populate -g 10000 -u 10000 -r 10000 Samba version 4.6.7 (Ubuntu 16.04) Can anyone please advise? Regards, Praveen Ghimire
On Sat, 24 Mar 2018 11:59:38 +0000 Praveen Ghimire via samba <samba at lists.samba.org> wrote:> Hi All, > > Following the link, tried to migrate NT4 to AD using LDAP but came > across some issues. > https://wiki.samba.org/index.php/Migrating_a_Samba_NT4_Domain_to_Samba_AD_(Classic_Upgrade) > > I have done this step multiple times using TDB as the backend and it > has always worked. > > The issue I am seeing is when I run the following, we get> ERROR(<type 'exceptions.IndexError'>): uncaught exception - list > index out of range FileOK, the above tells you what the error is> File "/usr/lib/python2.7/dist-packages/samba/upgrade.py", line 664, > in upgrade_from_samba3 urls = samba3.lp.get("passdb > backend").split(":",1)[1].strip('"')The above shows you where it is coming from> passdb backend = ldapsamBecause of the above ;-) If you look closely at what fails: samba3.lp.get("passdb backend").split(":",1)[1].strip('"') It takes the 'passdb backend' line and tries to split it at the ':' character and then removes any ' " ' Now you know what is wrong, how to fix it ? In the short term, try changing the 'passdb backend' line in smb.conf to this: passdb backend = ldapsam:"ldap://lin-pdc.lin/" Rowland
Hi Rowland, I did that initially and that came with Failed to connect to ldap URL 'ldap://lin-pdc.lin - LDAP client internal error: NT_STATUS_BAD_NETWORK_NAME Hence I removed the whole ldap:// bit After your email I tried again but using ldap://localhost and it seems to have worked. Not sure what the issue is with the fqdn. I could run ldap queries when using fqdn. Regards, Praveen Ghimire -----Original Message----- From: samba [mailto:samba-bounces at lists.samba.org] On Behalf Of Rowland Penny via samba Sent: Saturday, 24 March 2018 10:36 PM To: samba at lists.samba.org Subject: Re: [Samba] Samba NT4 to AD- LDAP On Sat, 24 Mar 2018 11:59:38 +0000 Praveen Ghimire via samba <samba at lists.samba.org> wrote:> Hi All, > > Following the link, tried to migrate NT4 to AD using LDAP but came > across some issues. > https://wiki.samba.org/index.php/Migrating_a_Samba_NT4_Domain_to_Samba > _AD_(Classic_Upgrade) > > I have done this step multiple times using TDB as the backend and it > has always worked. > > The issue I am seeing is when I run the following, we get> ERROR(<type 'exceptions.IndexError'>): uncaught exception - list index > out of range FileOK, the above tells you what the error is> File "/usr/lib/python2.7/dist-packages/samba/upgrade.py", line 664, in > upgrade_from_samba3 urls = samba3.lp.get("passdb > backend").split(":",1)[1].strip('"')The above shows you where it is coming from> passdb backend = ldapsamBecause of the above ;-) If you look closely at what fails: samba3.lp.get("passdb backend").split(":",1)[1].strip('"') It takes the 'passdb backend' line and tries to split it at the ':' character and then removes any ' " ' Now you know what is wrong, how to fix it ? In the short term, try changing the 'passdb backend' line in smb.conf to this: passdb backend = ldapsam:"ldap://lin-pdc.lin/" Rowland -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________