gestion de l'attribut mobile mobile
This commit is contained in:
+18
-1
@@ -220,6 +220,11 @@ infoEmail() {
|
|||||||
echo -ne "${GREEN}"
|
echo -ne "${GREEN}"
|
||||||
ldapsearch -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w "${LDAP_ADMIN_PASSWORD}" -b "cn=${CHOIX_MAIL},ou=users,${ldap_root}" | grep -i maildeSecours | sed -e 's/mailDeSecours://'
|
ldapsearch -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w "${LDAP_ADMIN_PASSWORD}" -b "cn=${CHOIX_MAIL},ou=users,${ldap_root}" | grep -i maildeSecours | sed -e 's/mailDeSecours://'
|
||||||
echo -ne "${NC}"
|
echo -ne "${NC}"
|
||||||
|
echo -ne " - Tel Mobile : "
|
||||||
|
echo -ne "${GREEN}"
|
||||||
|
REPMOBILE=$(ldapsearch -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w "${LDAP_ADMIN_PASSWORD}" -b "cn=${CHOIX_MAIL},ou=users,${ldap_root}" | grep -i mobile | sed -e 's/mobile://')
|
||||||
|
[ -z ${REPMOBILE} ] && echo "NC" || echo ${REPMOBILE}
|
||||||
|
echo -ne "${NC}"
|
||||||
echo -n " - Alias (Ldap) : "
|
echo -n " - Alias (Ldap) : "
|
||||||
echo -ne "${GREEN}"
|
echo -ne "${GREEN}"
|
||||||
LDAP_ALIAS=$(ldapsearch -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w "${LDAP_ADMIN_PASSWORD}" -b "cn=${CHOIX_MAIL},ou=users,${ldap_root}" | grep -i alias | cut -c 11-60)
|
LDAP_ALIAS=$(ldapsearch -H ldap://${LDAP_IP} -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" -x -w "${LDAP_ADMIN_PASSWORD}" -b "cn=${CHOIX_MAIL},ou=users,${ldap_root}" | grep -i alias | cut -c 11-60)
|
||||||
@@ -881,7 +886,7 @@ updateUser() {
|
|||||||
MAILDESECOURSACTUEL=""
|
MAILDESECOURSACTUEL=""
|
||||||
MAILDESECOURS=""
|
MAILDESECOURS=""
|
||||||
Ucompteur=1
|
Ucompteur=1
|
||||||
for attribut in mailDeSecours mailAlias mailQuota nextcloudQuota
|
for attribut in mailDeSecours mailAlias mailQuota nextcloudQuota mobile
|
||||||
do
|
do
|
||||||
ATTRIB+=([${attribut}]=$(ldapsearch -H ldap://${LDAP_IP} \
|
ATTRIB+=([${attribut}]=$(ldapsearch -H ldap://${LDAP_IP} \
|
||||||
-x -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" \
|
-x -D "cn=${LDAP_ADMIN_USERNAME},${ldap_root}" \
|
||||||
@@ -960,6 +965,18 @@ updateUser() {
|
|||||||
fi
|
fi
|
||||||
faitAttrib=0
|
faitAttrib=0
|
||||||
;;
|
;;
|
||||||
|
mobile )
|
||||||
|
read -p "Quel est le numéo du mobile au format 0XXXXXXXXXXX : " RCHANGE
|
||||||
|
if [[ ${RCHANGE} =~ ^[0-9]+$ ]] && [ "$(echo ${RCHANGE} | wc -L)" -eq "10" ]
|
||||||
|
then
|
||||||
|
# prévoir un passage en +33XXXXXXXXXX ?
|
||||||
|
CHANGED+=([mobile]="${RCHANGE}")
|
||||||
|
else
|
||||||
|
echo "Valeur incorecte"
|
||||||
|
sleep 3
|
||||||
|
fi
|
||||||
|
faitAttrib=0
|
||||||
|
;;
|
||||||
mailDeSecours )
|
mailDeSecours )
|
||||||
echo "------------------------------------------------"
|
echo "------------------------------------------------"
|
||||||
read -p " - Nouveau Mail de Secours : " RCHANGE
|
read -p " - Nouveau Mail de Secours : " RCHANGE
|
||||||
|
|||||||
Reference in New Issue
Block a user