[Samba] secrets.tbd going corrupt on powerfailure?

Tom Dickson tdickson at inostor.com
Thu Jul 22 16:38:16 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

We're power failing a unit before it goes into production, and we've
noticed that every time we fail it during a data transfer, smbd loses
the domain connection. I've traced it down to the secrets.tdb file.
After a power failure, tdbdump secrets.tdb says:

{
key = "SECRETS/SID/IN28C29E"
data =
"\01\04\00\00\00\00\00\05\15\00\00\00\D4r\9A\B6Sd\A3N\0A5\D7\DE\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
}
{
key = "INFO/random_seed\00"
data = "\C9\07\00\00"
}

The log.smbd says:

[2004/07/22 09:17:59, 0] tdb/tdbutil.c:tdb_log(724)
~  tdb(/etc/samba/secrets.tdb): remove_from_freelist: not on list at
off=1408
[2004/07/22 09:17:59, 0] tdb/tdbutil.c:tdb_log(724)
~  tdb(/etc/samba/secrets.tdb): tdb_free: left free failed at 1408

If I replace the secrets.tdb with a good one, and restart samba, it
works fine again. I'm worried that the domain user name maps would
change, though.

The interesting thing is, when I set the log level at 10 to try to find
out what was corrupting secrets.tdb (does that have to be written
constantly?), the problem went away!

I know that expecting samba to survive a power failure is a little much,
but I'm interested as to what is using that file at the time of failure.
If secrets.tdb changes rarely, can I just replace it if it gets corrupt?

Further information:

Samba version: 3.0.2a
Kernel: 2.4.26
Filesystem: /dev/md0 on / type ext3 (rw,data=journal)

I've uploaded a tarball of the secrets.tdb (bad) and secrets.tdb.good
at: http://schnecke.bombcar.com/secrets.tgz

- -Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFA/+132dxAfYNwANIRAgy4AJ4ndv7ywdIUbQZ6mDBhsnL00UHbLwCcCeP9
g5M+Z5sPnwlN62M5zLCYgTM=
=C9gu
-----END PGP SIGNATURE-----


More information about the samba mailing list