tdbsam serious problem when migrating from 3.0.32 to 3.3.2

Alexander Zagrebin alexz at visp.ru
Wed Mar 18 07:37:55 GMT 2009


 
> On Tue, Mar 17, 2009 at 03:58:16PM +0300, Alexander Zagrebin wrote:
> > I have tried to migrate from samba version 3.0.32 to 3.3.2 and found
> > the serious problem: samba can't convert my passdb.tdb from 
> version 3 to
> > version 4.
> > 
> > For example, when running "pdbedit -L" I receive:
> > 
> > # pdbedit -L
> > tdbsam_open: Converting version 3 database to version 4.
> > Could not store the new record: NT_STATUS_UNSUCCESSFUL
> > Converting records failed
> > tdbsam_open: Error when trying to convert tdbsam
> > [/usr/local/etc/samba/passdb.tdb]
> > tdbsam_getsampwnam: failed to open /usr/local/etc/samba/passdb.tdb!
> > Could not start searching users
> > Segmentation fault (core dumped)
> > 
> > With debugging (-d5) the output contains:
> > ...
> > Finding user тест
> > Trying _Get_Pwnam(), username as lowercase is тест
> > Get_Pwnam_internals did find user [тест]!
> > Could not store the new record: NT_STATUS_UNSUCCESSFUL
> > Converting records failed
> > ...
> > 
> > This problem exists only for user names, containing 
> characters with codes
> > from
> > range 128...255 (with high bit set).
> > 
> > I see 2 possible solutions.
> > 1. Migrate the passdb data via another backend (export at 
> 3.0.*/import at
> > 3.3.*). Which?
> > 2. Temporary rename users, but pdbedit doesn't has such 
> functionality...
> 
> Ok, I think a workaround for your situation should be:
> 
> 1). Add the patch you have sent above.
> 2). Run tdbbackup from Samba 3.3 on the passdb.tdb to
> create a new version with the newer hash values (still
> at version 3).
> 3). Replace the old passdb.tdb with the backed up
> version.
> 4). Run the (patched) 3.3.2 smbd - this should now
> correctly update your passdb.tdb including the
> users with the high bit set in their names.
> 
> Let me know if this fixes the problem for you, and
> I'll investigate adding a version of this into
> smbd as part of the upgrade process.
> 
> Thanks a *LOT* for raising this problem, I hadn't
> seen it before.

This workaround resolved the problem.
Now I'm successfully using 3.3.2.
Thanks!

-- 
Alexander Zagrebin



More information about the samba-technical mailing list