Bug 66699

Summary: fail to lock secrets.tdb globally when starting smbd
Product: [Retired] Red Hat Linux Reporter: tgke
Component: sambaAssignee: Trond Eivind Glomsrxd <teg>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-06-20 21:20:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description tgke 2002-06-13 19:11:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408

Description of problem:
The last samba daemon from samba-2.2.4-4 (RawHide) fails to start on a RH70
system. The binaries are built using the source RPM using the --rebuild option.

The log shows next message:

[2002/06/13 19:51:13, 0] tdb/tdbutil.c:tdb_log(492)
  tdb(unknown): tdb_open_ex: failed to get global lock on /etc/samba/secrets.tdb
: Invalid argument
[2002/06/13 19:51:13, 0] passdb/secrets.c:secrets_init(43)
  Failed to open /etc/samba/secrets.tdb




Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Build samba-2.2.4 binaries using rpm --rebuild on RH70 system (first need to
install/build needed packages like pam, db4, ..)
2. Install samba, setup for using as NT workstation in a NT domain, controlled
by a Microsoft primary domain controller.
3. Try to join the domain using "smbpasswd -j DOM -r pdc -U user".
(or try to startup daemon ("smbd -D").
	

Actual Results:  smbpasswd gives following error message:

tdb(unknown): tdb_open_ex: failed to get global lock on /etc/samba/secrets.tdb:
Invalid argument
Failed to open /etc/samba/secrets.tdb
Password: 
error storing domain secrets
Unable to join domain BRC.


Starting smbd fails with next message in the log:

[2002/06/13 19:51:45, 0] tdb/tdbutil.c:tdb_log(492)
  tdb(unknown): tdb_open_ex: failed to get global lock on /etc/samba/secrets.tdb
: Invalid argument
[2002/06/13 19:51:45, 0] passdb/secrets.c:secrets_init(43)
  Failed to open /etc/samba/secrets.tdb



Expected Results:  Succesful joining domain, or starting up the daemon. Or at
least some dependancy checking and explanation which components need to be upgraded.


Additional info:

The initscripts are not updated, although the rpm requires that. I strongly
believe that wouldn't help this problem. Current version of initscripts is
5.49-1 (default on RH70).

The same, freshly built binary RPMS install and work fine on a RH73 system,
where smbpasswd works, and daemon runs.

Comment 1 tgke 2002-06-14 08:55:55 UTC
Extracted the samba sources, and build manually using ---with-spinlocks instead
of default locking mechanism. Works fine now, but haven't applied the patches
and build with other parameters from default spec file.

Will try that later.


Comment 2 Trond Eivind Glomsrxd 2002-06-14 22:48:02 UTC
Is this a problem on a current system without a rebuild? RHL 7 has a 2.2 kernel,
which differs a lot in e.g. locking... (not saying that's the problem, just
pointing out that it's not intended for RHL 7 and bugs specific to this package
on that platform aren't interesting... generic bugs are)

Comment 3 tgke 2002-06-20 21:20:21 UTC
Using the binary RPM doesn't work, causing the described locking problem.

Tried to add --with-spinlocks configure parameter in de SPECS file, and
rebuilded RPM, but it encounters the same locking problem, so for the moment we
will stick to the simple source install.

BTW, I'm not saying this is really a bug which belongs here, I just try to
report the problem we had, and I guess it's your resposibility to put it in the
exact context, or maybe mark it invalid.

Regards.

Comment 4 Trond Eivind Glomsrxd 2002-06-20 22:16:02 UTC
Think I'll do that for now... please reopen if it can be reproduced on a release
with the included the samba. Official releases or beta releases.