Re: Unable to set root password with clear text using preseed/early_command

2022-02-18 Thread Brian Potkin
On Wed 16 Feb 2022 at 10:32:25 +0100, More Thanks wrote: > On Wed, Feb 16, 2022 at 04:52:48PM +0800, Glen Huang wrote: > > On Feb 16, 2022, at 4:38 PM, Philip Hands wrote: > > > Glen Huang writes: > > > > Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG > > > > to debug debconf, I

Re: Unable to set root password with clear text using preseed/early_command

2022-02-16 Thread More Thanks
On Wed, Feb 16, 2022 at 04:52:48PM +0800, Glen Huang wrote: > On Feb 16, 2022, at 4:38 PM, Philip Hands wrote: > > Glen Huang writes: > > > Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG > > > to debug debconf, I found out the seen flag should be set in order > > > for db_input to

Re: Unable to set root password with clear text using preseed/early_command

2022-02-16 Thread Glen Huang
Setting a placeholder value is a great idea, it simplifies the early_command since the seen flag no longer needs to be set. Thanks for the tip Philip. > On Feb 16, 2022, at 4:38 PM, Philip Hands wrote: > > Glen Huang writes: > >> Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG

Re: Unable to set root password with clear text using preseed/early_command

2022-02-16 Thread Philip Hands
Glen Huang writes: > Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG to debug > debconf, I found out the seen flag should be set in order for db_input to > pick up the value. > > Case solved, thanks to everyone helped! I was wondering about that, but didn't see my code setting l

Re: Unable to set root password with clear text using preseed/early_command

2022-02-15 Thread Glen Huang
Thanks to Cyril Brulebois’s tip that I could use DEBCONF_DEBUG to debug debconf, I found out the seen flag should be set in order for db_input to pick up the value. Case solved, thanks to everyone helped! > On Feb 16, 2022, at 9:52 AM, Glen Huang wrote: > > Thanks for the tip. > > I’m not su

Re: Unable to set root password with clear text using preseed/early_command

2022-02-15 Thread Glen Huang
Thanks for the tip. I’m not sure if escaping is the issue. I tried directly specifying the password: debconf-set passwd/root-password passwd1234 debconf-set passwd/root-password-again passwd1234 Still got prompted. I tried to debug it with d-i preseed/early_command string \ set -x; \ .

Re: Unable to set root password with clear text using preseed/early_command

2022-02-15 Thread Geert Stappers
On Tue, Feb 15, 2022 at 08:08:08PM +0800, Glen Huang wrote: > Hi, > > I want to set the root password to a random string. this is the preseed I use: > > d-i preseed/early_command string \ > pw="$(tr -dc A-Za-z0-9 debconf-set passwd/root-password "$pw"; \ > debconf-set passwd/root-pas