[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: autostep and encrypted root password



Jeffrey Bastian wrote:
So, a better solution would be to set a dummy password, e.g., xxxxxxxx, let it take the screenshot with the bullets in the fields, then replace it with the encrypted password from the kickstart file? Let me take a stab at that.


This patch does the above. What do you think about this approach? It fixed the problem in my limited testing.


--- account_gui.py.ORIG 2008-11-11 01:56:39.000000000 -0600
+++ account_gui.py      2008-11-11 17:28:55.000000000 -0600
@@ -68,8 +68,13 @@
                                         custom_icon="error")
                 passwordError()

-        self.rootPassword["password"] = self.pw.get_text()
-        self.rootPassword["isCrypted"] = False
+        if self.isCrypted:
+            self.rootPassword["password"] = self.cryptedPassword
+            self.rootPassword["isCrypted"] = True
+        else:
+            self.rootPassword["password"] = self.pw.get_text()
+            self.rootPassword["isCrypted"] = False
+
         return None

     def setFocus (self, area, data):
@@ -81,6 +86,8 @@
         self.intf = anaconda.intf

        self.passwords = {}
+        self.isCrypted = False
+        self.cryptedPassword = ""

         box = gtk.VBox ()
         box.set_border_width(5)
@@ -136,8 +143,13 @@
         wrapper.pack_start (self.rootStatus)
         box.pack_start (wrapper, False)

-        if not self.rootPassword["isCrypted"]:
-           self.pw.set_text(self.rootPassword["password"])
-           self.confirm.set_text(self.rootPassword["password"])
+        if self.rootPassword["isCrypted"]:
+            self.isCrypted = True
+            self.cryptedPassword = self.rootPassword["password"]
+            self.pw.set_text("xxxxxxxx")
+            self.confirm.set_text("xxxxxxxx")
+        else:
+            self.pw.set_text(self.rootPassword["password"])
+            self.confirm.set_text(self.rootPassword["password"])

         return box


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]