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

Re: Cannot preseed a locked password



> Err, so sorry for missing something here, but isn't
>    ROOT_PW="$RET"
> then wrong, as it will be "value set" irrespective of what value the user 
> chose to preseed?

Well, right, as this comes after a db_set line..:-)

I actually messed up things at some moment here. The code should be:

			db_get passwd/root-password-crypted || true
			if ! test $RET ; then

.../....
			else
			    # The root password was preseeded encrypted
			    # Clear it from the db, then set it
			    ROOT_PW="$RET"
			    db_set passwd/root-password-crypted ""
			    setpassword root "$ROOT_PW" true
			    ROOT_PW=''
			fi

The ROOT_PW= line goes *before* the db_set line not after, silly me.

So, there were two errors here:

-$RET not quoted
-place of the line


> OK.  I'm happy to test this out, but could you give me some (moderately) 
> detailed list of steps to build a suitable deb package and how to shoe-horn 
> it into the install process (sorry, I'm new to Debian development).

The easiest way is IMHO editing the
/target/var/lib/dpkg/info/passwd.config file before it's used in 2nd
stage.

So, at the end of the 1st stage, just switch to VT2 and there use nano
to edit this file  and make the changes I mention above.

> (BTW, we can take this off of the list, if this is too much like noise).


Well, it's really related to D-I so it seems on-topic to me.



Reply to: