[Samba] Samba Winbind Corrupted .tdb file
rtsai123
rtsai.it at gmail.com
Wed Apr 27 18:39:59 MDT 2011
HI I have an issue with our samba share where some XP users could not connect
to the share anymore. I traced it to a corrupted
/var/cache/samba/idmap_cache.tdb and winbind_idmap.tdb. The problem is
that we dont have backup of the .tdb files. I did, however, found a
solution but not positive it will work. Has anyone have had this issue
before and had a resolution for it? Below is a solution I found online and
the errors found in /var/log/samba/winbind-idmap.log
Thanks in advance.
Procedure for rebuilding db files of Samba:
1. Stopped the services
service smb stop service winbind stop
1. Removed these files
rm -rf /etc/samba/secrets.tdb rm -rf /etc/samba/smbpasswd rm -rf
/var/cache/samba/winbind_idmap.tdb
1. Rejoined the domain
net rpc join -W DOMAIN -Uadministrator%password
1. Restarted the services
service smb start service windbind start
1. All these command were succesful
wbinfo -u wbinfo -g getent passwd
#cat /var/log/samba/winbindd-idmap.log
[2011/04/22 18:52:28, 0] lib/util_tdb.c:tdb_log(664)
tdb(/var/cache/samba/winbindd_idmap.tdb): tdb_rec_read bad magic
0x42424242 at offset=25896
[2011/04/22 18:52:28, 0] lib/util_tdb.c:tdb_log(664)
tdb(/var/cache/samba/winbindd_idmap.tdb): tdb_rec_read bad magic
0x42424242 at offset=25896
[2011/04/22 18:52:28, 0] lib/util_tdb.c:tdb_log(664)
tdb(/var/cache/samba/winbindd_idmap.tdb): tdb_rec_read bad magic
0x42424242 at offset=25984
[2011/04/22 18:52:28, 0] lib/util_tdb.c:tdb_log(664)
tdb(/var/cache/samba/winbindd_idmap.tdb): tdb_rec_read bad magic
0x42424242 at offset=25896
[2011/04/22 18:52:28, 0] nsswitch/idmap_tdb.c:idmap_tdb_set_mapping(971)
Error storing SID -> ID: Corrupt database
[2011/04/22 18:54:48, 0] lib/util_tdb.c:tdb_log(664)
tdb(/var/cache/samba/idmap_cache.tdb): tdb_rec_read bad magic 0x42424242
at offset=35648
[2011/04/22 18:54:48, 0] lib/util_tdb.c:tdb_log(664)
tdb(/var/cache/samba/idmap_cache.tdb): tdb_rec_read bad magic 0x42424242
at offset=35648
[2011/04/22 18:54:56, 0] lib/util_tdb.c:tdb_log(664)
tdb(/var/cache/samba/winbindd_idmap.tdb): tdb_rec_read bad magic
0xd9fee666 at offset=25720
[2011/04/22 18:54:56, 0] lib/util_tdb.c:tdb_log(664)
--
View this message in context: http://samba.2283325.n4.nabble.com/Samba-Winbind-Corrupted-tdb-file-tp3479810p3479810.html
Sent from the Samba - General mailing list archive at Nabble.com.
More information about the samba
mailing list