summaryrefslogtreecommitdiffstats
path: root/users.py
diff options
context:
space:
mode:
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: