Score:0

Make cryptsetup prompt at boot time ignorable

pf flag

I have a machine with multiple users. Home directory for one user is encrypted with LUKS. There is a crypttab entry for opening the LUKS partition at boot time.

When the system boots up, it asks for the encryption passphrase.

There are other users on the system who do not have their home directory encrypted. How do I allow booting the system up with opening the LUKS partition only optionally?

I would like other users to be able to skip entering the passphrase.

If you press Esc or ^D at the prompt, the system goes into emergency mode. I would like it to continue booting normally instead.

OS Ubuntu 22.04.1 LTS

Kernel version 5.15.0-58-generic

Mounted partition structure is below:

$ cat /etc/fstab
UUID=a5f0521f-070e-4319-b7d4-d13a6f8de6ec /               ext4    errors=remount-ro 0       1
/swapfile                                 none            swap    sw              0       0
UUID=0786-63C0  /boot/efi       vfat    defaults      0       1
/dev/nvme0n1p3 /mnt/win ntfs rw,relatime 0 1
/dev/mapper/docs /home/dmitry ext4 rw,relatime 0 1

Here's the crypttab

$ cat /etc/crypttab
docs /dev/nvme0n1p9 none luks,discard
ar flag
Welcome to Ask Ubuntu. Please [edit your question](https://askubuntu.com/posts/1453609/edit) and include the distro and version of Linux you are using. Also include the partition structure of the SSDs//HDDs. It is not clear if the whole `/home` is in a separate partition or the `/home/james_bond` is in a separate partition. Or you used some other means to encrypt the special user's home folder. Add all these information to your question. Copy and paste the content of the file `/etc/fstab` into your question and format it as `code` using the {_} icon above the edit window.
ar flag
Try commenting out the last line of `/etc/fstab`: that is, put a `#` in front of the line `/dev/mapper/docs /home/dmitry ext4 rw,relatime 0 1`. The reboot. This will not mount the encrypted folder at computer start/reboot. And therefore will not ask for the LUKS password. I don't know if you will be able to login as the user `dimitry` after that. Update your question with what happens when you try to login.
ar flag
The above will probably not work, as the user `dmitry` won't be able to login.
I sit in a Tesla and translated this thread with Ai:

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.