Bug 1565 - winbindd_idmap.tdb from 2.2.8 system corrupts under 3.0.4
Summary: winbindd_idmap.tdb from 2.2.8 system corrupts under 3.0.4
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: winbind (show other bugs)
Version: 3.0.4
Hardware: x86 Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-27 14:38 UTC by Bill Marshall
Modified: 2005-08-24 10:15 UTC (History)
2 users (show)

See Also:


Attachments
text dump of winbind_idmap.idb (50.26 KB, application/octet-stream)
2004-07-27 14:42 UTC, Bill Marshall
no flags Details
1 good, 1 corrupt winbind_idmap.tdb (215.37 KB, application/x-gzip)
2004-07-27 14:48 UTC, Bill Marshall
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Marshall 2004-07-27 14:38:57 UTC
We have some 2.2.8 systems that somehow have ended up with "duplicate" mappings
in the winbind_idmap tdb. i.e. more than one SID mapping to/from the same UID or
GID or vice-versa.

Example:
[root@x locks]# /usr/local/samba/bin/tdbdump winbindd_idmap.tdb | grep -b1 -a1
"GID 1457"
74350-key = "S-1-5-21-212947539-1368211815-1555891258-21692\00"
74408:data = "GID 1457\00"
74429-}
--
418618-{
418620:key = "GID 1457\00"
418640-data = "S-1-5-21-212947539-1368211815-1555891258-30803\00"
--
524245-key = "S-1-5-21-212947539-1368211815-1555891258-30803\00"
524303:data = "GID 1457\00"
524324-}

We can take this system, upgrade it to 3.0.4 and then use tdbtool to remove all
duplicate problems. However, if I getent group or getent passwd (to dump the
whole lists) I will end up with new corruption (duplicate mappings)

We also dumped the tdb to a text file ( /usr/local/samba/bin/tdbdump
winbindd_idmap.tdb > winbindd_idmap.txt) and then used some perl to reinsert all
the data into a new tdb. We were able to get corruption here too.

I can obtain loglevel 10 traces upon request - they are large.
Comment 1 Bill Marshall 2004-07-27 14:42:29 UTC
Created attachment 583 [details]
text dump of winbind_idmap.idb

output from /usr/local/samba/bin/tdbdump winbindd_idmap.tdb >
winbindd_idmap.txt
Comment 2 Bill Marshall 2004-07-27 14:48:12 UTC
Created attachment 584 [details]
1 good, 1 corrupt  winbind_idmap.tdb

2 files:
winbindd_idmap_fixed_from_228.tdb.bak -> file from 2.2.8 system, all duplicate
mappings removed using tdbtool on 3.0.4 system. 
winbindd_idmap.tdb has duplicate mappings. Based on previous file, corrupted w/
getent group
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-02-09 08:47:11 UTC
I think volker added a fix to prevent this from happening.  Please retest 3.0.11.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:15:49 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.