Score:0

Preseed ubuntu - multiple passwords to Luks

jp flag

I would like to add at least two passwords to LUKS during installation system from preseed file.

In pressed file I have my first password:

d-i partman-auto/method string crypto
d-i partman-crypto/passphrase password FirstPassword
d-i partman-crypto/passphrase-again password FirstPassword

and on the end file I added this command:

ubiquity ubiquity/success_command string 

This command downloading script from my server and running it. And this is great, I can add new user, download browser, change hostname etc. One of this commands is adding new password to luks

printf '%s\n' "FirstPassword" "SecondPassword" "SecondPassword" | sudo cryptsetup luksAddKey /dev/sda6

but this command doesn't work in script but I'm sure syntax is good, because when I execute this command in terminal then new password is added to Luks I can execute all script after installation system and it's work also, but when script is executed during pressed file then everything is ok except this adding second password to luks.

Andrew Lowther avatar
jp flag
Are you installing the desktop image? What version of Ubuntu? The `ubiquity` settings would only apply to the desktop images using the Ubiquity installer.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.