diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-01-31 05:11:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:44:27 -0500 |
commit | ae174faf36dbe28b24069bafe5836b6271c87e12 (patch) | |
tree | 5aa18849fe38ce4b99cca36078e2552ae9fa9f2e /source4/script/tests/mk-fedora-ds.sh | |
parent | 5e12e0024934c074ad5141f67fb95550e8aac69c (diff) | |
download | samba-ae174faf36dbe28b24069bafe5836b6271c87e12.tar.gz samba-ae174faf36dbe28b24069bafe5836b6271c87e12.tar.bz2 samba-ae174faf36dbe28b24069bafe5836b6271c87e12.zip |
r21069: Try to split up the mktestsetup.sh script into parts to deal with each
LDAP implementation, and another to hold the key blobs.
Also fix the OpenLDAP test.
Andrew Bartlett
(This used to be commit ec511c592bbb7df513fe6f62e06e1fa984431550)
Diffstat (limited to 'source4/script/tests/mk-fedora-ds.sh')
-rw-r--r-- | source4/script/tests/mk-fedora-ds.sh | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/source4/script/tests/mk-fedora-ds.sh b/source4/script/tests/mk-fedora-ds.sh new file mode 100644 index 0000000000..b10d46881c --- /dev/null +++ b/source4/script/tests/mk-fedora-ds.sh @@ -0,0 +1,73 @@ +FEDORA_DS_INF=$LDAPDIR/fedorads.inf +export FEDORA_DS_INF +FEDORA_DS_INITIAL_LDIF=$LDAPDIR/fedorads-initial-ldif.inf +FEDORA_DS_LDAP_PORT=3389 + +LDAP_URI="ldap://127.0.0.1:$FEDORA_DS_LDAP_PORT" + +$srcdir/bin/ad2oLschema $CONFIGURATION -H $PRIVATEDIR/sam.ldb --option=convert:target=fedora-ds -I $srcdir/setup/schema-map-fedora-ds-1.0 -O $LDAPDIR/99_ad.ldif >&2 + +cat >$FEDORA_DS_INF <<EOF + +[General] +SuiteSpotUserID = $ROOT +FullMachineName= localhost +ServerRoot= $LDAPDIR +ConfigDirectoryLdapURL= $FEDORA_DS_LDAP_URI/o=NetscapeRoot +ConfigDirectoryAdminID= $USERNAME +AdminDomain= localdomain +ConfigDirectoryAdminPwd= $PASSWORD + +Components= svrcore,base,slapd + +[slapd] +ServerPort= $FEDORA_DS_LDAP_PORT +Suffix= $BASEDN +RootDN= cn=Manager,$BASEDN +RootDNPwd= $PASSWORD +Components= slapd +ServerIdentifier= samba4 +InstallLdifFile=$FEDORA_DS_INITIAL_LDIF + +inst_dir= $LDAPDIR/slapd-samba4 +config_dir= $LDAPDIR/slapd-samba4 +schema_dir= $LDAPDIR/slapd-samba4/schema +lock_dir= $LDAPDIR/slapd-samba4/lock +log_dir= $LDAPDIR/slapd-samba4/logs +run_dir= $LDAPDIR/slapd-samba4/logs +db_dir= $LDAPDIR/slapd-samba4/db +bak_dir= $LDAPDIR/slapd-samba4/bak +tmp_dir= $LDAPDIR/slapd-samba4/tmp +ldif_dir= $LDAPDIR/slapd-samba4/ldif +cert_dir= $LDAPDIR/slapd-samba4 + +[base] +Components= base + +EOF + +cat >$FEDORA_DS_INITIAL_LDIF<<EOF +# These entries need to be added to get the container for the +# provision to be aimed at. + +dn: cn="dc=$BASEDN",cn=mapping tree,cn=config +objectclass: top +objectclass: extensibleObject +objectclass: nsMappingTree +nsslapd-state: backend +nsslapd-backend: UserData +cn: $BASEDN + +dn: cn=UserData,cn=ldbm database,cn=plugins,cn=config +objectclass: extensibleObject +objectclass: nsBackendInstance +nsslapd-suffix: $BASEDN + +EOF + +LDAP_URI_ESCAPE=$LDAP_URI; +PROVISION_OPTIONS="$PROVISION_OPTIONS --ldap-module=nsuniqueid" +#it is easier to base64 encode this than correctly escape it: +# (targetattr = "*") (version 3.0;acl "full access to all by all";allow (all)(userdn = "ldap:///anyone");) +PROVISION_ACI="--aci=aci:: KHRhcmdldGF0dHIgPSAiKiIpICh2ZXJzaW9uIDMuMDthY2wgImZ1bGwgYWNjZXNzIHRvIGFsbCBieSBhbGwiO2FsbG93IChhbGwpKHVzZXJkbiA9ICJsZGFwOi8vL2FueW9uZSIpOykK" + |