Compatibilit pour utilisation sur bleu
darcs-hash:20050810074749-41617-9fc545ee2c1c6805ca794f0ddf6632164fbb7213.gz
This commit is contained in:
parent
f2e002f0e5
commit
32827b7459
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ if __name__ == '__main__' :
|
||||||
if self_mode :
|
if self_mode :
|
||||||
s = commands.getoutput('sudo -u respbats ldap_whoami')
|
s = commands.getoutput('sudo -u respbats ldap_whoami')
|
||||||
else :
|
else :
|
||||||
s = commands.getoutput("/usr/bin/ldapsearch -x -LLL '(&(objectClass=posixAccount)(uid=%s))' dn nom prenom droits" % login).strip()
|
s = commands.getoutput("""/usr/bin/ldapsearch -D cn=admin,dc=crans,dc=org -w $(awk -F"'" '/ldap_pass/ {print $2}' /usr/scripts/gestion/secrets.py) -x -LLL '(&(objectClass=posixAccount)(uid=%s))' dn nom prenom droits""" % login).strip()
|
||||||
if not s :
|
if not s :
|
||||||
cprint('Login non trouvé dans la base LDAP','rouge')
|
cprint('Login non trouvé dans la base LDAP','rouge')
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue