GetPassword supprimé car on source et c'est mieux !
This commit is contained in:
@@ -5,16 +5,17 @@ KAZ_ROOT=/kaz
|
||||
setKazVars
|
||||
|
||||
. $DOCKERS_ENV
|
||||
. $KAZ_BIN_DIR/getPasswords.sh ldapServ nextcloudDB
|
||||
. $KAZ_KEY_DIR/env-ldapServ
|
||||
. $KAZ_KEY_DIR/env-nextcloudDB
|
||||
|
||||
LDAP_IP=$(docker inspect -f '{{.NetworkSettings.Networks.ldapNet.IPAddress}}' ldapServ)
|
||||
|
||||
docker exec -i nextcloudDB mysql --user=${nextcloudDB_MYSQL_USER} --password=${nextcloudDB_MYSQL_PASSWORD} ${nextcloudDB_MYSQL_DATABASE} <<< "select uid from oc_users;" > /tmp/nc_users.txt
|
||||
docker exec -i nextcloudDB mysql --user=${MYSQL_USER} --password=${MYSQL_PASSWORD} ${MYSQL_DATABASE} <<< "select uid from oc_users;" > /tmp/nc_users.txt
|
||||
|
||||
OLDIFS=${IFS}
|
||||
IFS=$'\n'
|
||||
for line in `cat /tmp/nc_users.txt`; do
|
||||
result=$(ldapsearch -h $LDAP_IP -D "cn=${ldapServ_LDAP_ADMIN_USERNAME},${ldap_root}" -w ${ldapServ_LDAP_ADMIN_PASSWORD} -b $ldap_root -x "(identifiantKaz=${line})" | grep numEntries)
|
||||
result=$(ldapsearch -h $LDAP_IP -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -w ${LDAP_ADMIN_PASSWORD} -b $ldap_root -x "(identifiantKaz=${line})" | grep numEntries)
|
||||
echo "${line} ${result}" | grep -v "numEntries: 1" | grep -v "^uid"
|
||||
done
|
||||
IFS=${OLDIFS}
|
||||
|
Reference in New Issue
Block a user