[chgpass] ldap_crans dépend aussi de chgpass, et cracklib n'est pas partout.

* On fait donc un import plus lazy et sécurisé
This commit is contained in:
Pierre-Elliott Bécue 2014-04-14 19:48:34 +02:00
parent 1dc52d6fa0
commit 47166fc404
2 changed files with 20 additions and 13 deletions

View file

@ -19,7 +19,7 @@ import netaddr
import time
import annuaires_pg as annuaires
import config, config.impression, iptools, ip6tools, cPickle, config_mail
from chgpass import chgpass
from chgpass import change_password
from affich_tools import coul, prompt, cprint
from email_tools import send_email
from syslog import openlog, closelog, syslog
@ -1951,7 +1951,7 @@ class BaseProprietaire(BaseClasseCrans):
args+= self._data['uid'][0]
r = prompt(u"Attribuer tout de suite un mot de passe ? [O/N]", "O")
if r == 'O' or r == 'o':
chgpass(self.dn)
change_password(self.dn)
else:
ret += coul(u' Il faudra penser à attribuer un mot de passe\n', 'jaune')