Bug 8468 - anaconda in kickstart mode does not handle --iscrypted well
Summary: anaconda in kickstart mode does not handle --iscrypted well
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: installer
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Turner
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-14 14:57 UTC by Karl Burkett
Modified: 2015-01-07 23:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-14 18:13:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Karl Burkett 2000-01-14 14:57:15 UTC
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 19:31:59 UTC
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 18:13:59 UTC
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.