From a249198d539685be5cb97e179e85ae00dbba8c83 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 11 Jan 2005 14:04:58 +0000 Subject: r4682: A LDB-based secrets implementation in Samba4. This uses LDB (a local secrets.ldb and the global samdb) to fill out the secrets from an LSA perspective. Some small changes to come, but the bulk of the work is now done. A re-provision is required after this change. Andrew Bartlett (This used to be commit ded33033521a6a1c7ea80758c5c5aeeebb182a51) --- source4/script/provision.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'source4/script') diff --git a/source4/script/provision.pl b/source4/script/provision.pl index 2dd37bed12..cc6e1adf21 100755 --- a/source4/script/provision.pl +++ b/source4/script/provision.pl @@ -389,6 +389,31 @@ system("ldbadd -H newrootdse.ldb newrootdse.ldif"); print "done\n"; +$data = FileLoad("secrets.ldif") || die "Unable to load secrets.ldif\n"; + +$res = ""; + +print "applying substitutions ...\n"; + +while ($data =~ /(.*?)\$\{(\w*)\}(.*)/s) { + my $sub = substitute($2); + $res .= "$1$sub"; + $data = $3; +} +$res .= $data; + +print "saving ldif to newsecrets.ldif ...\n"; + +FileSave("newsecrets.ldif", $res); + +unlink("newsecrets.ldb"); + +print "creating newsecrets.ldb ...\n"; + +system("ldbadd -H newsecrets.ldb newsecrets.ldif"); + +print "done\n"; + print "generating dns zone file ...\n"; $data = FileLoad("provision.zone") || die "Unable to load provision.zone\n"; @@ -425,6 +450,8 @@ Installation: Samba4 installation - Please move newrootdse.ldb to rootdse.ldb in the private/ directory of your Samba4 installation +- Please move newsecrets.ldb to secrets.ldb in the private/ directory + of your Samba4 installation - Please move newhklm.ldb to hklm.ldb in the private/ directory of your Samba4 installation - Please use $dnsdomain.zone to in BIND dns server -- cgit