Compare commits
3 Commits
2.6.2/mast
...
master
Author | SHA1 | Date |
---|---|---|
Philippe Caseiro | 613b33236c | |
Philippe Caseiro | ff8eb3a042 | |
Philippe Caseiro | 87e015fd63 |
|
@ -1,14 +1,26 @@
|
||||||
--- distrib/slapd.conf 2019-06-04 11:18:04.000000000 +0200
|
--- distrib/slapd.conf 2019-06-04 11:18:04.000000000 +0200
|
||||||
+++ modif/slapd.conf 2020-03-24 09:10:44.724586266 +0100
|
+++ modif/slapd.conf 2021-01-12 11:06:19.496162295 +0100
|
||||||
@@ -23,6 +23,7 @@
|
@@ -23,11 +23,19 @@
|
||||||
%elif %%ldap_schema == 'zephir'
|
%elif %%ldap_schema == 'zephir'
|
||||||
include /etc/ldap/schema/openldap.schema
|
include /etc/ldap/schema/openldap.schema
|
||||||
%end if
|
%end if
|
||||||
+include /etc/ldap/schema/cadoles.schema
|
+include /etc/ldap/schema/cadoles.schema
|
||||||
|
|
||||||
## Support du TLS
|
## Support du TLS
|
||||||
|
+%if %%cert_type == "manuel"
|
||||||
|
+TLSCertificateFile %%server_cert
|
||||||
|
+TLSCertificateKeyFile %%server_key
|
||||||
|
+TLSCACertificateFile %%server_pem
|
||||||
|
+%else
|
||||||
TLSCertificateFile /etc/ldap/ssl/certs/openldap.crt
|
TLSCertificateFile /etc/ldap/ssl/certs/openldap.crt
|
||||||
@@ -46,6 +47,7 @@
|
TLSCertificateKeyFile /etc/ldap/ssl/private/openldap.key
|
||||||
|
TLSCACertificateFile /etc/ssl/certs/ca.crt
|
||||||
|
+%end if
|
||||||
|
+
|
||||||
|
TLSVerifyClient never
|
||||||
|
TLSCipherSuite SECURE256:+SIGN-ALL:-VERS-SSL3.0:!AES-128-CBC:!3DES-CBC:!DES-CBC:!ARCFOUR-128:!ARCFOUR-40:!RC2-40:!CAMELLIA-128-CBC:!NULL
|
||||||
|
|
||||||
|
@@ -46,6 +54,7 @@
|
||||||
%if %%ldap_replication == 'oui' or %%ldap_replication_client == 'oui'
|
%if %%ldap_replication == 'oui' or %%ldap_replication_client == 'oui'
|
||||||
moduleload syncprov
|
moduleload syncprov
|
||||||
%end if
|
%end if
|
||||||
|
@ -16,11 +28,23 @@
|
||||||
|
|
||||||
# Sample security restrictions
|
# Sample security restrictions
|
||||||
# Require integrity protection (prevent hijacking)
|
# Require integrity protection (prevent hijacking)
|
||||||
@@ -219,3 +221,7 @@
|
@@ -80,6 +89,7 @@
|
||||||
%if %%ldap_replication_client == 'oui'
|
|
||||||
include /etc/ldap/replication.conf
|
# compatibilite EAD1 et appli PHP
|
||||||
|
allow bind_v2
|
||||||
|
+allow bind_anon_dn
|
||||||
|
|
||||||
|
database bdb
|
||||||
|
# The base of your directory
|
||||||
|
@@ -216,6 +226,10 @@
|
||||||
|
syncprov-sessionlog 100
|
||||||
%end if
|
%end if
|
||||||
+
|
|
||||||
+overlay memberof
|
+overlay memberof
|
||||||
+memberof-group-oc cadolesGroup
|
+memberof-group-oc cadolesGroup
|
||||||
+memberof-member-ad cadolesMember
|
+memberof-member-ad cadolesMember
|
||||||
|
+
|
||||||
|
%if %%ldap_replication_client == 'oui'
|
||||||
|
include /etc/ldap/replication.conf
|
||||||
|
%end if
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.1
|
||||||
|
schemaIdGuid:: BS9z8eJKvYZ+lS8OJgeC1g==
|
||||||
|
cn: cadolesPerson
|
||||||
|
name: cadolesPerson
|
||||||
|
lDAPDisplayName: cadolesPerson
|
||||||
|
description: Description Personne Cadoles
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: givensName
|
||||||
|
mayContain: usualname
|
||||||
|
mayContain: birthdate
|
||||||
|
mayContain: birthcountry
|
||||||
|
mayContain: birthplace
|
||||||
|
mayContain: gender
|
||||||
|
mayContain: job
|
||||||
|
mayContain: position
|
||||||
|
mayContain: belongingpopulation
|
||||||
|
mayContain: authlevel
|
||||||
|
defaultObjectCategory: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.2
|
||||||
|
schemaIdGuid:: 7pJbNueSjwpq7TsL2aiW1w==
|
||||||
|
cn: cadolesSiren
|
||||||
|
name: cadolesSiren
|
||||||
|
lDAPDisplayName: cadolesSiren
|
||||||
|
description: Siren
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: siren
|
||||||
|
mayContain: niveau01
|
||||||
|
defaultObjectCategory: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.3
|
||||||
|
schemaIdGuid:: BOOf/nwBuCFehtpsyYrLjA==
|
||||||
|
cn: cadolesSiret
|
||||||
|
name: cadolesSiret
|
||||||
|
lDAPDisplayName: cadolesSiret
|
||||||
|
description: Siret
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: siret
|
||||||
|
mayContain: postalAddress
|
||||||
|
mayContain: niveau02
|
||||||
|
defaultObjectCategory: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
||||||
|
DN:
|
||||||
|
changeType: modify
|
||||||
|
add: schemaUpdateNow
|
||||||
|
schemaUpdateNow: 1
|
||||||
|
-
|
||||||
|
|
||||||
|
dn: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
changeType: add
|
||||||
|
objectClass: top
|
||||||
|
objectClass: classSchema
|
||||||
|
governsID: 2.16.840.1.113732.3.1.4
|
||||||
|
schemaIdGuid:: IPc/rPzhpAjekHrvXgdI8w==
|
||||||
|
cn: cadolesGroup
|
||||||
|
name: cadolesGroup
|
||||||
|
lDAPDisplayName: cadolesGroup
|
||||||
|
description: Descirption Groupe Cadoles
|
||||||
|
subClassOf: top
|
||||||
|
objectClassCategory: 3
|
||||||
|
mayContain: cadolesMember
|
||||||
|
defaultObjectCategory: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
||||||
|
|
|
@ -297,100 +297,3 @@ description: Label Etablissement
|
||||||
attributeSyntax: 2.5.5.12
|
attributeSyntax: 2.5.5.12
|
||||||
oMSyntax: 64
|
oMSyntax: 64
|
||||||
isSingleValued: TRUE
|
isSingleValued: TRUE
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.1
|
|
||||||
schemaIdGuid:: BS9z8eJKvYZ+lS8OJgeC1g==
|
|
||||||
cn: cadolesPerson
|
|
||||||
name: cadolesPerson
|
|
||||||
lDAPDisplayName: cadolesPerson
|
|
||||||
description: Description Personne Cadoles
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: givensName
|
|
||||||
mayContain: usualname
|
|
||||||
mayContain: birthdate
|
|
||||||
mayContain: birthcountry
|
|
||||||
mayContain: birthplace
|
|
||||||
mayContain: gender
|
|
||||||
mayContain: job
|
|
||||||
mayContain: position
|
|
||||||
mayContain: belongingpopulation
|
|
||||||
mayContain: authlevel
|
|
||||||
defaultObjectCategory: CN=cadolesPerson,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.2
|
|
||||||
schemaIdGuid:: 7pJbNueSjwpq7TsL2aiW1w==
|
|
||||||
cn: cadolesSiren
|
|
||||||
name: cadolesSiren
|
|
||||||
lDAPDisplayName: cadolesSiren
|
|
||||||
description: Siren
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: siren
|
|
||||||
mayContain: niveau01
|
|
||||||
defaultObjectCategory: CN=cadolesSiren,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.3
|
|
||||||
schemaIdGuid:: BOOf/nwBuCFehtpsyYrLjA==
|
|
||||||
cn: cadolesSiret
|
|
||||||
name: cadolesSiret
|
|
||||||
lDAPDisplayName: cadolesSiret
|
|
||||||
description: Siret
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: siret
|
|
||||||
mayContain: postalAddress
|
|
||||||
mayContain: niveau02
|
|
||||||
defaultObjectCategory: CN=cadolesSiret,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
DN:
|
|
||||||
changeType: modify
|
|
||||||
add: schemaUpdateNow
|
|
||||||
schemaUpdateNow: 1
|
|
||||||
-
|
|
||||||
|
|
||||||
dn: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
changeType: add
|
|
||||||
objectClass: top
|
|
||||||
objectClass: classSchema
|
|
||||||
governsID: 2.16.840.1.113732.3.1.4
|
|
||||||
schemaIdGuid:: IPc/rPzhpAjekHrvXgdI8w==
|
|
||||||
cn: cadolesGroup
|
|
||||||
name: cadolesGroup
|
|
||||||
lDAPDisplayName: cadolesGroup
|
|
||||||
description: Descirption Groupe Cadoles
|
|
||||||
subClassOf: top
|
|
||||||
objectClassCategory: 3
|
|
||||||
mayContain: cadolesMember
|
|
||||||
defaultObjectCategory: CN=cadolesGroup,CN=Schema,CN=Configuration,{DNCONFIG}
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Initialisation of LDAP Directory
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run command as particular user
|
||||||
|
#
|
||||||
|
function runAs() {
|
||||||
|
USER=${1}
|
||||||
|
shift
|
||||||
|
CMD="su ${USER} -s /bin/bash -c ${@}"
|
||||||
|
|
||||||
|
eval ${CMD}
|
||||||
|
return ${?}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addLDAPschema()
|
||||||
|
{
|
||||||
|
LDIF="/etc/cadolesldap/init/cadolesldap.ldif"
|
||||||
|
USER="openldap"
|
||||||
|
CMD="\"slapadd -l ${LDIF} -f \"/etc/ldap/slapd.conf\"\""
|
||||||
|
|
||||||
|
service slapd stop
|
||||||
|
runAs ${USER} ${CMD}
|
||||||
|
result=$((result+${?}))
|
||||||
|
service slapd start
|
||||||
|
return ${result}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addADSchema()
|
||||||
|
{
|
||||||
|
/usr/share/eole/sbin/cadoles_add_schema.sh
|
||||||
|
return ${?}
|
||||||
|
}
|
||||||
|
|
||||||
|
function main()
|
||||||
|
{
|
||||||
|
MODE=${1}
|
||||||
|
result=0
|
||||||
|
|
||||||
|
|
||||||
|
if [[ ${MODE} == "instance" ]]
|
||||||
|
then
|
||||||
|
if [[ $(CreoleGet eole_module) == "seth" ]]
|
||||||
|
then
|
||||||
|
addADSchema
|
||||||
|
return ${?}
|
||||||
|
else
|
||||||
|
addLDAPschema
|
||||||
|
return ${?}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $(CreoleGet eole_module eolebase) != "seth" ]]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(CreoleGet activer_cadolesldap non) == "oui" ]]
|
||||||
|
then
|
||||||
|
main $@
|
||||||
|
exit ${?}
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
|
@ -55,6 +55,11 @@ function main()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ $(CreoleGet eole_module eolebase) == "seth" ]]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $(CreoleGet activer_cadolesldap non) == "oui" ]]
|
if [[ $(CreoleGet activer_cadolesldap non) == "oui" ]]
|
||||||
then
|
then
|
||||||
main $@
|
main $@
|
||||||
|
|
|
@ -33,7 +33,7 @@ RETURNED=$(ldbsearch --option="dsdb:schema update allowed"=true -H /var/lib/samb
|
||||||
|
|
||||||
if [ "$RETURNED" = "# returned 0 records" ]; then
|
if [ "$RETURNED" = "# returned 0 records" ]; then
|
||||||
# Import schema
|
# Import schema
|
||||||
SCHEMAS="cadoles.schema"
|
SCHEMAS="cadoles.schema cadoles.schema-2"
|
||||||
PRIVATE_DIR=/etc/eole/private
|
PRIVATE_DIR=/etc/eole/private
|
||||||
|
|
||||||
for schema in $SCHEMAS
|
for schema in $SCHEMAS
|
||||||
|
|
Loading…
Reference in New Issue