Bug 8468 - anaconda in kickstart mode does not handle --iscrypted well
anaconda in kickstart mode does not handle --iscrypted well
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: installer (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-01-14 09:57 EST by Karl Burkett
Modified: 2015-01-07 18:40 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-14 13:13:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karl Burkett 2000-01-14 09:57:15 EST
Congradulations on anaconda - in general it works quite well. However there
is a problem when trying to use kickstart with it.  The kickstart.conf
command:

rootpw zgoqj2n9SIvQg --iscrypted DUMMYENTRY

does not work correctly.  The code fails to recognise the --iscrypted flag
with the result that an encrypted string is encrypted again and there is no
hope of getting into the system with a simple password (Though come to
think about it, this is a great security feature to insure that really good
root passwords are used. Afterall, who in their right mind would use
zgoqj2n9SIvQg as a password.). I've managed to locate and fix the problem
and I'll address how in just a moment, but first let me explain the
"DUMMYENTRY" in the command line. It exists to help get past a list problem
in the code.  I did this as a quick work around because of my just starting
to understand python and anaconda.  Basicly it worked and I left it at
that.  The problem line is in the file kickstart.py at line 19, which
reads:

InstallClass.doRootPw(self, extra[0], isCrypted = isCrypted)

The extra[0] is the problem.  Without DUMMYENTRY extra does not get forced
to being a list at which time python complains about index out of range.
I'll leave this for you guy's to solve unless things get real slow here.

Now for how I solved the --iscrypted problem:

in installclass.py on line 152 add:

        self.isCrypted = isCrypted

or stated another way, the doRootPw routine should look like:

    def doRootPw(self, pw, isCrypted = 0):
        self.rootPassword = pw
        self.isCrypted = isCrypted

The next step is to motify the todo.py file at line 1248 to look like:

            todo.rootpassword.set(todo.instClass.rootPassword,
                todo.instClass.isCrypted)

where it used to look like:

            todo.rootpassword.set(todo.instClass.rootPassword)

and thus failed to pass the isCyrypted flag to the set routine/method.

Hope this will help.
Comment 1 jastr 2000-01-15 14:31:59 EST
This removes the need for a DUMMYENTRY after --iscrypted

--- kickstart.py~       Sat Sep 25 13:01:19 1999
+++ kickstart.py        Thu Jan  6 03:14:22 2000
@@ -8,7 +8,7 @@
 class Kickstart(InstallClass):

     def doRootPw(self, args):
-       (args, extra) = isys.getopt(args, '', [ 'iscrypted=' ])
+       (args, extra) = isys.getopt(args, '', [ 'iscrypted' ])

        isCrypted = 0
        for n in args:
Comment 2 Jay Turner 2000-02-14 13:13:59 EST
This is fixed in the latest version of the installer (available in beta).

Note You need to log in before you can comment on or make changes to this bug.