samba4 migration problems

Andrew Bartlett abartlet at samba.org
Wed Apr 18 18:00:52 MDT 2012


On Tue, 2012-04-10 at 13:14 +0200, Marc Muehlfeld wrote:
> Hi,
> 
> I try to setup samba4 in my test environment and currently do the samba3->4 
> migration by following 
> http://wiki.samba.org/index.php/Samba4/samba3upgrade/HOWTO. But I'm having 
> trouble at the "samba-tool domain samba3upgrade..." command:
> 
> First it crashes here:
> tdb(/usr/var/locks3/gencache.tdb):Corrupt database: Record offset 696 has 
> incorrect hash
> gencache_init: tdb_check(/usr/var/locks3/gencache.tdb) failed - retry after 
> truncate
> 
> To workaround this, I removed the gencache.tdb. Is this file required to migrate?

No, gencache should not be required to migrate, but this isn't a good sign. 

> Then it crashes on every well known SID 
> (http://support.microsoft.com/kb/243330) starting with SID S-1-5-32-* like 
> "Print Operators", "Users", etc:
> 
> ERROR(<class 'passdb.error'>): uncaught exception - Unable to enumerate 
> members for alias, (-1073741487,NT_STATUS_NO_SUCH_ALIAS)
>    File 
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py", 
> line 162, in _run
>      return self.run(*args, **kwargs)
>    File 
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line 
> 925, in run
>      useeadb=eadb)
>    File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py", 
> line 552, in upgrade_from_samba3
>      members = s3db.enum_aliasmem(group.sid)

If this is on a new server, not the server that was running Samba3, can
you set 'ldapsam:trusted = yes' in your smb.conf, or ensure that
nss_ldap is set up correctly?

A debug level 5 (set it in your original smb.conf) would be quite
helpful if you could share it with me, it will tell me why these groups
failed. 

Do other groups get migrated in correctly?

Regardless of if that helps, could you also try my attached patch.  It
should ignore these errors, and continue the migration.

> To temp. ship around this problem, I removed all groups starting with 
> S-1-5-32-*. Now it continues, but finally breaks on wins.dat:
> 
> Importing WINS database
> ERROR(<type 'exceptions.ValueError'>): uncaught exception - invalid literal 
> for int() with base 16: ''
>    File 
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py", 
> line 162, in _run
>      return self.run(*args, **kwargs)
>    File 
> "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/domain.py", line 
> 925, in run
>      useeadb=eadb)
>    File "/usr/local/samba/lib64/python2.6/site-packages/samba/upgrade.py", 
> line 653, in upgrade_from_samba3
>      samba3_winsdb = samba3.get_wins_db()
>    File 
> "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py", 
> line 399, in get_wins_db
>      return WinsDatabase(self.statedir_path("wins.dat"))
>    File 
> "/usr/local/samba/lib64/python2.6/site-packages/samba/samba3/__init__.py", 
> line 333, in __init__
>      nb_flags = int(entries[i][:-1], 16)

Can you get me a copy of your wins database to I can fix our parsing
code?

> 
> I tried alpha18 and the git version from 04/09/2012.
> 
> Any idea what is wrong and how I can fix it?

I'm very happy to help sort out these issues. 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-s3upgrade-Ignore-with-warning-groups-that-are-lis.patch
Type: text/x-patch
Size: 2368 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120419/ae27fa6f/attachment.bin>


More information about the samba-technical mailing list