cryptdisks_start will not read a passphrase from stdin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Is this the intended behaviour? cryptdisks_start can't be used for scripting because it won't accept the passphrase from stdin:
# key=foo
# echo $key | cryptdisks_start cdata
* Starting crypto disk... * cdata (starting)... Nothing to read on input.
OTOH, 'cryptsetup open' *does* read a passphrase from stdin:
if ! output=$(echo "$key" | cryptsetup open /dev/mapper/
echo "'cryptsetup open' failed ($output)"
exit 1
fi
I'm thinking that the user-friendly version of 'cryptsetup open' should perhaps also do this.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: cryptsetup 2:2.4.3-1ubuntu1.2
ProcVersionSign
Uname: Linux 5.15.0-91-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckR
Date: Mon Jan 8 18:11:10 2024
InstallationDate: Installed on 2023-12-24 (15 days ago)
InstallationMedia: Ubuntu-Server 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230810)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: cryptsetup
UpgradeStatus: No upgrade log present (probably fresh install)
cmdline: BOOT_IMAGE=
crypttab:
# <target name> <source device> <key file> <options>
cswap /dev/mapper/
cdata /dev/mapper/