The solution to the following problems:
Failed to open byte range locking database
/usr/local/samba/var/locks/connections.tdb not initialized
ERROR: Failed to initialise locking database
Can't initialise locking module - exiting
Any ONE or more of these errors can be caused by missing LOCK files.
Lock files are located based on you smb.conf file: lock directory
or your distro has a place:
Mandrake: /var/cache/samba/
Rhat: /var/cache/samba/
other I've heard of: /var/lock/samba/
I had this problem when upgrading from samba 2.2.6 to 2.2.7. No big deal. Went to another server and grabbed the missing lock files.
Here's a link of mine backed up:
http://smp.byteharmony.com/~happy/ft...d/locks.tar.gz
unzip the file in a temp dir and use the following command to copy the files missing to your locks dir:
(assuming /var/cache/samba is your locks dir)
(assuming your in the directory where you unziped the files tar -zxf locks.tar.gz)
cp locks/* /var/cache/samba
Say: n
to every question where it asks you if you want to over write your files. If you do want to overwrite them, be my guest, I didn't test that

.
1st donation after taking so much

,
BK