Setting debconf values in preseed early_command script
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm working on a preseeded environment where one of the steps is to have an admin put in their credentials in order to authenticate the system after build.
I'm currently doing this all in a late_command
script, using debconf to prompt for the admin credentials:
db_input critical admin_user/username
db_input critical admin_password/password
And then using them:
db_get admin_user/username
admin_user=$RET
db_get admin_password/password
admin_password=$RET
authenticate -u $admin_user -p $admin_password ...
This all works fine - however the issue is that the user has to wait until the host has finished the main install before being prompted.
To speed up the process, I'd like to prompt for the credentials in an early_command
script, and then read and use the values in late_command
.
Moving the db_input
part to early_command prompts the user as expected, but when the
late_command` script runs later they aren't there any more.
I'm guessing something happens to clear/reset the debconf values after early_command, but I'm not sure if there's a way to avoid this? Any suggestions? (I can fall back to writing the values out to file and reading that back later, but I'd prefer to avoid writing credentials to disk if possible).
preseed debconf
add a comment |Â
up vote
0
down vote
favorite
I'm working on a preseeded environment where one of the steps is to have an admin put in their credentials in order to authenticate the system after build.
I'm currently doing this all in a late_command
script, using debconf to prompt for the admin credentials:
db_input critical admin_user/username
db_input critical admin_password/password
And then using them:
db_get admin_user/username
admin_user=$RET
db_get admin_password/password
admin_password=$RET
authenticate -u $admin_user -p $admin_password ...
This all works fine - however the issue is that the user has to wait until the host has finished the main install before being prompted.
To speed up the process, I'd like to prompt for the credentials in an early_command
script, and then read and use the values in late_command
.
Moving the db_input
part to early_command prompts the user as expected, but when the
late_command` script runs later they aren't there any more.
I'm guessing something happens to clear/reset the debconf values after early_command, but I'm not sure if there's a way to avoid this? Any suggestions? (I can fall back to writing the values out to file and reading that back later, but I'd prefer to avoid writing credentials to disk if possible).
preseed debconf
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm working on a preseeded environment where one of the steps is to have an admin put in their credentials in order to authenticate the system after build.
I'm currently doing this all in a late_command
script, using debconf to prompt for the admin credentials:
db_input critical admin_user/username
db_input critical admin_password/password
And then using them:
db_get admin_user/username
admin_user=$RET
db_get admin_password/password
admin_password=$RET
authenticate -u $admin_user -p $admin_password ...
This all works fine - however the issue is that the user has to wait until the host has finished the main install before being prompted.
To speed up the process, I'd like to prompt for the credentials in an early_command
script, and then read and use the values in late_command
.
Moving the db_input
part to early_command prompts the user as expected, but when the
late_command` script runs later they aren't there any more.
I'm guessing something happens to clear/reset the debconf values after early_command, but I'm not sure if there's a way to avoid this? Any suggestions? (I can fall back to writing the values out to file and reading that back later, but I'd prefer to avoid writing credentials to disk if possible).
preseed debconf
I'm working on a preseeded environment where one of the steps is to have an admin put in their credentials in order to authenticate the system after build.
I'm currently doing this all in a late_command
script, using debconf to prompt for the admin credentials:
db_input critical admin_user/username
db_input critical admin_password/password
And then using them:
db_get admin_user/username
admin_user=$RET
db_get admin_password/password
admin_password=$RET
authenticate -u $admin_user -p $admin_password ...
This all works fine - however the issue is that the user has to wait until the host has finished the main install before being prompted.
To speed up the process, I'd like to prompt for the credentials in an early_command
script, and then read and use the values in late_command
.
Moving the db_input
part to early_command prompts the user as expected, but when the
late_command` script runs later they aren't there any more.
I'm guessing something happens to clear/reset the debconf values after early_command, but I'm not sure if there's a way to avoid this? Any suggestions? (I can fall back to writing the values out to file and reading that back later, but I'd prefer to avoid writing credentials to disk if possible).
preseed debconf
asked Jun 7 at 9:13
match
1964
1964
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448369%2fsetting-debconf-values-in-preseed-early-command-script%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password