From 1578cf0bad91e82bc17806c01ac4a5d0dee43c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bertrand=20N=C3=A9ron?= Date: Tue, 27 Mar 2012 08:41:08 +0000 Subject: [PATCH] BUG FIX replace string passwd by variable passwd when update sha --- src/parser/useradd.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/parser/useradd.py b/src/parser/useradd.py index 3aba9f4..7475198 100644 --- a/src/parser/useradd.py +++ b/src/parser/useradd.py @@ -1,5 +1,3 @@ -#/usr/bin/env python - import os import hashlib import getpass @@ -14,7 +12,7 @@ while( passwd != confirm_passwd ): print "passwords does not match" h=hashlib.sha1() -h.update('passwd') +h.update( passwd ) salt = os.urandom(16).encode('hex') h.update( salt ) print "\n##################" -- GitLab