On Tue, 2012-12-04 at 15:41 -0500, Thomas Simmons wrote: > Hello, > > I get the following error when performing a classicupgrade on rc6. This > does not occur with rc4 or rc5. The command I am using is: > > samba-tool domain classicupgrade \ > --dbdir=/root/import/var/lib/samba --use-xattrs=yes \ > --realm=internal.testdom.com /root/import/etc/samba/smb.conf > > ERROR(<type 'exceptions.IndexError'>): uncaught exception - list index out > of range > 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 > 1318, in run > useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs) > File "/usr/local/samba/lib/python2.7/site-packages/samba/upgrade.py", > line 800, in upgrade_from_samba3 > homes[username] = get_posix_attr_from_ldap_backend(logger, ldb_object, > base_dn, username, "homeDirectory") > File "/usr/local/samba/lib/python2.7/site-packages/samba/upgrade.py", > line 546, in get_posix_attr_from_ldap_backend > return msg[0][attr][0] > The connection to the LDAP server was closed
Sorry for the inconvenience, please try this patch. Andrew Bartlett -- Andrew Bartlett http://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org
>From 771b5819ce9d411973a463920b80244f59d4c0ee Mon Sep 17 00:00:00 2001 From: Andrew Bartlett <[email protected]> Date: Wed, 5 Dec 2012 10:35:50 +1100 Subject: [PATCH] scripting: Handle missing LDAP entries in samba-tool domain classicupgrade Reported-by: Thomas Simmons <[email protected]> --- source4/scripting/python/samba/upgrade.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py index 13d33c1..df9415e 100644 --- a/source4/scripting/python/samba/upgrade.py +++ b/source4/scripting/python/samba/upgrade.py @@ -802,6 +802,8 @@ Please fix this account before attempting to upgrade again homes[username] = pwd.getpwnam(username).pw_dir except KeyError: pass + except IndexError: + pass try: if ldap: @@ -810,6 +812,8 @@ Please fix this account before attempting to upgrade again shells[username] = pwd.getpwnam(username).pw_shell except KeyError: pass + except IndexError: + pass try: if ldap: @@ -818,6 +822,8 @@ Please fix this account before attempting to upgrade again pgids[username] = pwd.getpwnam(username).pw_gid except KeyError: pass + except IndexError: + pass logger.info("Reading WINS database") samba3_winsdb = None -- 1.7.11.7
-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
