Fix ldap schema import for Set module

This commit is contained in:
Philippe Caseiro 2021-01-20 16:29:34 +01:00
parent 87e015fd63
commit ff8eb3a042
2 changed files with 9 additions and 106 deletions

View File

@ -297,100 +297,3 @@ description: Label Etablissement
attributeSyntax: 2.5.5.12
oMSyntax: 64
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}

View File

@ -33,23 +33,23 @@ RETURNED=$(ldbsearch --option="dsdb:schema update allowed"=true -H /var/lib/samb
if [ "$RETURNED" = "# returned 0 records" ]; then
# Import schema
SCHEMAS="cadoles.schema"
SCHEMAS="cadoles.schema cadoles.schema-2"
PRIVATE_DIR=/etc/eole/private
for schema in $SCHEMAS
do
updateSchemaDN "{DNCONFIG}" "${DN}" /etc/ldap/schema/eole/${schema}.ldif
if [[ $? -ne 0 ]]
then
updateSchemaDN "{DNCONFIG}" "${DN}" /etc/ldap/schema/eole/${schema}.ldif
if [[ $? -ne 0 ]]
then
echo "Error updating DN for ${schema}"
break
fi
ldbmodify -H /var/lib/samba/private/sam.ldb /etc/ldap/schema/eole/${schema}.ldif --option="dsdb:schema update allowed"=true
if [[ $? -ne 0 ]]
then
echo "Error updating Schema ${schema} !!"
break
fi
if [[ $? -ne 0 ]]
then
echo "Error updating Schema ${schema} !!"
break
fi
done
fi