From f33c2107e31ef61de9cdcb74071b556e9465f101 Mon Sep 17 00:00:00 2001 From: pauget Date: Thu, 9 Sep 2004 13:25:24 +0200 Subject: [PATCH] Demande de chgpass au cours de l'enregistrement. darcs-hash:20040909112524-41617-020604c393358bd2d6090a21e7915603e46be24c.gz --- gestion/ldap_crans.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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=[]