tdb_lock failed

Simo Sorce simo.sorce at xsec.it
Wed Oct 29 09:09:43 GMT 2003


On Tue, 2003-10-28 at 22:23, Brandon Craig Rhodes wrote:
> Jeremy Allison <jra at samba.org> writes:
> 
> > Hopefully not :-(. Did you try Andrew Bartletts suggestion of 
> > running winbindd to cause it to linearise the queries to the DC ?
> 
> >From what I am seeing, contention for the secrets.tdb record lock on
> the client machines are automatically linearizing requests from
> particular labs, and only three labs are up at the moment.
> 
> I am thinking that our 2 MB smbpasswd file is probably becoming a
> point of resource contention.  I would like to move over to something
> that does not require a linear search, and a passdb.tdb seems the most
> obvious quick target - but unfortunately most of the 23,452 entries
> are old-style ones of the form:
> 
> aa103:60001:<hash>:<hash>:U
> 
> without the trailing unique identifiers that the pdbedit command needs
> to migrate an smbpasswd file to a passdb.tdb hash.
> 
> Does *anyone* know how to process an old-style smbpasswd file to add
> the trailing unique identifiers to each entry?!

Hello Brandon, it is not any magic unique identifier.
The last number of the most recent smbpasswd format is simply the time
expressed in unix time the password was changed last.

Just calculate a the last week unix time and use a script that add the
same value to all the entries in the file prepended by the string "LCT-"
(Last Change Time), well you also need to put the U into square brackets

so aa103:60001:<hash>:<hash>:U
should become:
aa103:60001:<hash>:<hash>:[U        ]:LCT-1066810135

I think it is really easy to build up a shell script to do so, just be
sure nobody is changing it's password while you chenge the file :-)

Simo.

-- 
Simo Sorce - simo.sorce at xsec.it
Xsec s.r.l. - http://www.xsec.it
via Durando 10 Ed. G - 20158 - Milano
mobile: +39 329 328 7702
tel. +39 02 2399 7130 - fax: +39 02 700 442 399



More information about the samba-technical mailing list