1 FEDORA_DS_INF
=$LDAPDIR/fedorads.inf
2 FEDORA_DS_INITIAL_LDIF
=$LDAPDIR/fedorads-initial.ldif
4 echo "FEDORA_DS_LOGLEVEL=0"
6 #Make the subdirectory be as fedora DS would expect
7 FEDORA_DS_DIR
=$LDAPDIR/slapd-samba4
8 echo FEDORA_DS_DIR
=$FEDORA_DS_DIR
10 cat >$FEDORA_DS_INF <<EOF
12 SuiteSpotUserID = $ROOT
13 FullMachineName= localhost
17 ldapifilepath=$LDAPDIR/ldapi
19 RootDN= cn=Manager,$BASEDN
21 ServerIdentifier= samba4
22 InstallLdifFile=$FEDORA_DS_INITIAL_LDIF
24 inst_dir= $FEDORA_DS_DIR
25 config_dir= $FEDORA_DS_DIR
26 schema_dir= $FEDORA_DS_DIR/schema
27 lock_dir= $FEDORA_DS_DIR/lock
28 log_dir= $FEDORA_DS_DIR/logs
29 run_dir= $FEDORA_DS_DIR/logs
30 db_dir= $FEDORA_DS_DIR/db
31 bak_dir= $FEDORA_DS_DIR/bak
32 tmp_dir= $FEDORA_DS_DIR/tmp
33 ldif_dir= $FEDORA_DS_DIR/ldif
34 cert_dir= $FEDORA_DS_DIR
40 cat >$FEDORA_DS_INITIAL_LDIF<<EOF
41 # These entries need to be added to get the container for the
42 # provision to be aimed at.
44 dn: cn="dc=$BASEDN",cn=mapping tree,cn=config
46 objectclass: extensibleObject
47 objectclass: nsMappingTree
48 nsslapd-state: backend
49 nsslapd-backend: userData
52 dn: cn=userData,cn=ldbm database,cn=plugins,cn=config
53 objectclass: extensibleObject
54 objectclass: nsBackendInstance
55 nsslapd-suffix: $BASEDN
59 perl
$FEDORA_DS_PREFIX/bin
/ds_newinst.pl
$FEDORA_DS_INF >&2 ||
exit 1;
62 cd $FEDORA_DS_DIR/schema
63 ls |
grep -v ^
00core |
xargs rm
66 $srcdir/bin
/ad2oLschema
$CONFIGURATION -H $PRIVATEDIR/sam.ldb
--option=convert
:target
=fedora-ds
-I $srcdir/setup
/schema-map-fedora-ds-1.0
-O $FEDORA_DS_DIR/schema
/99_ad.ldif
>&2
68 LDAP_URI_ESCAPE
="ldapi://"`echo $LDAPDIR/ldapi | sed 's|/|%2F|g'`
70 PROVISION_OPTIONS
="$PROVISION_OPTIONS --ldap-module=nsuniqueid"
71 #it is easier to base64 encode this than correctly escape it:
72 # (targetattr = "*") (version 3.0;acl "full access to all by all";allow (all)(userdn = "ldap:///anyone");)
73 PROVISION_ACI
="--aci=aci:: KHRhcmdldGF0dHIgPSAiKiIpICh2ZXJzaW9uIDMuMDthY2wgImZ1bGwgYWNjZXNzIHRvIGFsbCBieSBhbGwiO2FsbG93IChhbGwpKHVzZXJkbiA9ICJsZGFwOi8vL2FueW9uZSIpOykK"