Fix ldap schema import for Set module

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

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