Bug 5068 - Provisioning: Strange error message when "sam.ldb" isn't found
Summary: Provisioning: Strange error message when "sam.ldb" isn't found
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Andrew Bartlett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-10 02:58 UTC by Matthias Dieter Wallnöfer
Modified: 2007-11-10 03:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Dieter Wallnöfer 2007-11-10 02:58:12 UTC
Because I got some strange warnings from the provision script, I tried to delete the sam.ldb file from the /usr/local/samba/private path and thought, that the provisioning recreates it. It does, but curiously only after the second run.
The first time it breaks with a nonsense message:

Setting up secrets.ldb
Setting up the registry
Setting up sam.ldb partitions
Setting up sam.ldb attributes
ldb load failed: Entry @ATTRIBUTES already exists
smbscript: ejsEvalScript(): Assertion failure

Backtrace:
	[ 0]       setup_add_ldif:12   -> 			assert(add_res.error == 0)
	[ 1]            provision:63   -> 	setup_add_ldif("provision_init.ldif", info, samdb, false)
	[ 2]                     :167  -> 	provision(subobj, message, blank, paths, system_session, creds, ldapbackend)
Comment 1 Andrew Bartlett 2007-11-10 03:33:44 UTC
It would recreate the whole lot if you deleted the whole lot.  While the message is odd (due to interaction with the partitions module) if you delete part of the database, you can expect odd results...