diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-07-03 00:44:20 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-07-03 00:44:20 +0000 |
commit | ead13b3e2196c2e6efdb642f3c1887f19405d6fc (patch) | |
tree | b84b125b84c8e4aa5e9f35b4c8827cbfa906ae41 | |
parent | 799fd0fc2912b0ce9dc03399c87225cf42c0dad3 (diff) | |
download | anaconda-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)
-rw-r--r-- | instdata.py | 2 | ||||
-rw-r--r-- | users.py | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/instdata.py b/instdata.py index 2afa83bc1..228dd52d1 100644 --- a/instdata.py +++ b/instdata.py @@ -123,7 +123,7 @@ class InstallData: self.mouse.writeKS(f) self.xconfig.writeKS(f) self.network.writeKS(f) - self.rootPassword.writeKS(f) + self.rootPassword.writeKS(f, self.auth) self.firewall.writeKS(f) self.auth.writeKS(f) self.timezone.writeKS(f) @@ -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: |