summaryrefslogtreecommitdiffstats
path: root/users.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-03 00:44:20 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-03 00:44:20 +0000
commitead13b3e2196c2e6efdb642f3c1887f19405d6fc (patch)
treeb84b125b84c8e4aa5e9f35b4c8827cbfa906ae41 /users.py
parent799fd0fc2912b0ce9dc03399c87225cf42c0dad3 (diff)
downloadanaconda-ead13b3e2196c2e6efdb642f3c1887f19405d6fc.tar.gz
anaconda-ead13b3e2196c2e6efdb642f3c1887f19405d6fc.tar.xz
anaconda-ead13b3e2196c2e6efdb642f3c1887f19405d6fc.zip
if the user has requested md5 passwords, write out the root password in the
autogenerated ks.cfg as an md5 crypted password (46294)
Diffstat (limited to 'users.py')
-rw-r--r--users.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/users.py b/users.py
index 613ef3bba..844cb6673 100644
--- a/users.py
+++ b/users.py
@@ -94,8 +94,12 @@ class RootPassword(Password):
setPassword(instPath, "root", self.getCrypted (),
auth.useMD5, alreadyCrypted = 1)
- def writeKS(self, f):
- f.write("rootpw --iscrypted %s\n" % self.getCrypted())
+ def writeKS(self, f, auth):
+ pure = self.getPure()
+ if pure:
+ f.write("rootpw --iscrypted %s\n" %(cryptPassword(pure, auth.useMD5)))
+ else:
+ f.write("rootpw --iscrypted %s\n" %(self.getCrypted()))
def cryptPassword(password, useMD5):
if useMD5: