Bug 134608

Summary: smbd crashes when started
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Richard Herron <nafari02>
Component: NetworkAssignee: Lars Müller <lmuelle>
Status: VERIFIED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: info, samba-maintainers
Version: Final   
Target Milestone: ---   
Hardware: x86   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: registry.tdb binary file used by samba
smb.conf file

Description Richard Herron 2005-11-21 02:57:18 UTC
I have SuSE 10.0 (final) plus all patches as of this date, via yast online update.
Samba initially worked when installed Oct 20, 2005.  Now, no shared drives are visible. This happend within the last week.  On further investigation smbd is not running (it has crashed or exited).  Rebooting/restarting smb does not help.

/var/log/messages has:
Nov 19 19:20:57 bean smbd[30229]: [2005/11/19 19:20:57, 0] tdb/tdbutil.c:tdb_log(767)
Nov 19 19:20:57 bean smbd[30229]:   tdb(/var/lib/samba/registry.tdb): rec_read bad magic 0x42424242 at offset=4212
Nov 19 19:20:57 bean smbd[30229]: [2005/11/19 19:20:57, 0] tdb/tdbutil.c:tdb_log(767)
Nov 19 19:20:57 bean smbd[30229]:   tdb(/var/lib/samba/registry.tdb): rec_read bad magic 0x42424242 at offset=4212
Nov 19 19:20:57 bean smbd[30229]: [2005/11/19 19:20:57, 0] tdb/tdbutil.c:tdb_log(767)
Nov 19 19:20:57 bean smbd[30229]:   tdb(/var/lib/samba/registry.tdb): rec_read bad magic 0x42424242 at offset=4212
Nov 19 19:20:57 bean smbd[30229]: [2005/11/19 19:20:57, 0] tdb/tdbutil.c:tdb_log(767)
Nov 19 19:20:57 bean smbd[30229]:   tdb(/var/lib/samba/registry.tdb): rec_free_read bad magic 0x42424242 at offset=4324
Nov 19 19:20:57 bean smbd[30229]: [2005/11/19 19:20:57, 0] registry/reg_db.c:regdb_store_keys(344)
Nov 19 19:20:57 bean smbd[30229]:   regdb_store_keys: Failed to store new record for key [HKLM\SYSTEM\CurrentControlSet/Services}
Nov 19 19:20:57 bean smbd[30229]: [2005/11/19 19:20:57, 0] registry/reg_db.c:init_registry_db(223)
Nov 19 19:20:57 bean smbd[30229]:   init_registry: Failed to initiailize data in registry!
Nov 19 19:20:57 bean smbd[30229]: [2005/11/19 19:20:57, 0] registry/reg_frontend.c:init_registry(57)
Nov 19 19:20:57 bean smbd[30229]:   init_registry: failed to initialize the registry tdb!

I used yast to remove samba-related updates and reinstall samba stuff from the CDs, but it did not help.  Now the system again has all the updates from yast online update.

Attempting to start from the command prompt gives:
bean:/var/log # smbd -i -S 
smbd version 3.0.20b-3.1-SUSE started.
Copyright Andrew Tridgell and the Samba Team 1992-2005
tdb(/var/lib/samba/registry.tdb): rec_read bad magic 0x42424242 at offset=4212
tdb(/var/lib/samba/registry.tdb): rec_read bad magic 0x42424242 at offset=4212
tdb(/var/lib/samba/registry.tdb): rec_read bad magic 0x42424242 at offset=4212
tdb(/var/lib/samba/registry.tdb): rec_free_read bad magic 0x42424242 at offset=4324
regdb_store_keys: Failed to store new record for key [HKLM\SYSTEM\CurrentControlSet/Services}
init_registry: Failed to initiailize data in registry!
init_registry: failed to initialize the registry tdb!

Happy to provide more information if needed.
Comment 1 Lars Müller 2005-11-21 11:34:12 UTC
Can you please attache your /var/lib/samba/registry.tdb and /etc/samba/smb.conf?

Then mv /var/lib/samba/registry.tdb /some/backup/path/of/samba/

And try to start samba again.
Comment 2 Richard Herron 2005-11-22 04:33:42 UTC
Created attachment 57962 [details]
registry.tdb binary file used by samba

registry.tdb attached
Comment 3 Richard Herron 2005-11-22 04:36:25 UTC
Created attachment 57963 [details]
smb.conf file

attached /etc/samba/smb.conf
Comment 4 Richard Herron 2005-11-22 04:59:16 UTC
I followed the suggestion of moving /var/lib/samba/registry.tdb and restarting samba.  Samba started with no problems and kept running.  No messages were output to /var/log/messages.

Samba shared drives are now accessible from Windows machines.

This work-around seems to have fixed the problem, but I don't know what the underlying cause may have been.  I will be satisfied if you choose to close this bug, but I am willing to help pursue it if you like.

Comment 5 Tristan Hoffmann 2009-03-20 15:40:27 UTC
No activity for years.
Please reopen if this is still a problem on a supported version of openSUSE
(10.3 or later)