diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 33db67f7..8cd1b129 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -26,7 +26,8 @@ import smtplib, sre, os, random, string, time, sys import ldap, ldap.modlist import config, annuaires, iptools, chgpass, user_tests -from affich_tools import coul +from chgpass import chgpass +from affich_tools import coul, prompt from time import sleep,localtime import ldap_secret @@ -991,6 +992,12 @@ class base_proprietaire(base_classes_crans) : args+= self._data['uidNumber'][0] + ',' args+= self._data['uid'][0] self.services_to_restart('home',[ args ]) + r = prompt("Attribuer tout de suite un mot de passe ? [O/N]","O") + if r=='O' or r=='o' : + chgpass(self.dn) + else : + ret += coul(u' Il faudra penser à attribuer un mot de passe\n','jaune') + # Remise à zero self.modifs=[]