Adding first ActiveDirectory support
Need to be fixed : admin user membership FIXME note added
This commit is contained in:
@ -17,25 +17,42 @@ function runAs() {
|
||||
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
|
||||
MODE=${1}
|
||||
result=0
|
||||
|
||||
|
||||
if [[ ${MODE} == "instance" ]]
|
||||
then
|
||||
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}
|
||||
fi
|
||||
if [[ ${MODE} == "instance" ]]
|
||||
then
|
||||
if [[ $(CreoleGet eole_module) == "seth" ]]
|
||||
then
|
||||
addADSchema
|
||||
return ${?}
|
||||
else
|
||||
addLDAPschema
|
||||
return ${?}
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ $(CreoleGet activer_cadolesldap non) == "oui" ]]
|
||||
|
Reference in New Issue
Block a user