diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-07-27 00:23:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:30:05 -0500 |
commit | 66b2a04346a568e6564b9cb21a89cf887cad3d03 (patch) | |
tree | f87081c370373939889c695fb0da0be0746bff69 /source4/scripting/libjs | |
parent | 40119dcb1d72795513bdad4018eff19fdc4a203d (diff) | |
download | samba-66b2a04346a568e6564b9cb21a89cf887cad3d03.tar.gz samba-66b2a04346a568e6564b9cb21a89cf887cad3d03.tar.bz2 samba-66b2a04346a568e6564b9cb21a89cf887cad3d03.zip |
r8790: Finish the migration of aliases and privilages with SamSync, by adding
templating support for foreignSecurityPrincipals to the samdb module.
This is an extension beyond what microsoft does, and has been very
useful :-)
The setup scripts have been modified to use the new template, as has
the SAMR and LSA code.
Other cleanups in LSA remove the assumption that the short domain name
is the first component of the realm.
Also add a lot of useful debug messages, to make it clear how/why the
SamSync may have gone wrong. Many of these should perhaps be hooked
into an error string.
Andrew Bartlett
(This used to be commit 1f071b0609c5c83024db1d4a7d04334a932b8253)
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r-- | source4/scripting/libjs/provision.js | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index b6a7c5978b..0bcb2fa761 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -56,19 +56,10 @@ function add_foreign(str, sid, desc, unixname) dn: CN=${SID},CN=ForeignSecurityPrincipals,${BASEDN} objectClass: top objectClass: foreignSecurityPrincipal -cn: ${SID} description: ${DESC} -instanceType: 4 -whenCreated: ${LDAPTIME} -whenChanged: ${LDAPTIME} +unixName: ${UNIXNAME} uSNCreated: 1 uSNChanged: 1 -showInAdvancedViewOnly: TRUE -name: ${SID} -objectGUID: ${NEWGUID} -objectSid: ${SID} -objectCategory: CN=Foreign-Security-Principal,CN=Schema,CN=Configuration,${BASEDN} -unixName: ${UNIXNAME} "; var sub = new Object(); sub.SID = sid; @@ -212,7 +203,7 @@ function setup_file(template, fname, subobj) /* provision samba4 - caution, this wipes all existing data! */ -function provision(subobj, message) +function provision(subobj, message, blank) { var data = ""; var lp = loadparm_init(); @@ -249,7 +240,11 @@ function provision(subobj, message) message("Setting up sam.ldb templates\n"); setup_ldb("provision_templates.ldif", "sam.ldb", subobj, NULL, false); message("Setting up sam.ldb data\n"); - setup_ldb("provision.ldif", "sam.ldb", subobj, data, false); + setup_ldb("provision.ldif", "sam.ldb", subobj, NULL, false); + if (blank == false) { + message("Setting up sam.ldb users and groups\n"); + setup_ldb("provision_users.ldif", "sam.ldb", subobj, data, false); + } message("Setting up rootdse.ldb\n"); setup_ldb("rootdse.ldif", "rootdse.ldb", subobj); message("Setting up secrets.ldb\n"); |