[Bug 2048681] [NEW] cryptdisks_start will not read a passphrase from stdin
EML
2048681 at bugs.launchpad.net
Mon Jan 8 18:22:06 UTC 2024
Public bug reported:
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/vg0-data cdata 2>&1); then
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
ProcVersionSignature: Ubuntu 5.15.0-91.101-generic 5.15.131
Uname: Linux 5.15.0-91-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
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-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: cryptsetup
UpgradeStatus: No upgrade log present (probably fresh install)
cmdline: BOOT_IMAGE=/vmlinuz-5.15.0-91-generic root=/dev/mapper/vg0-root ro
crypttab:
# <target name> <source device> <key file> <options>
cswap /dev/mapper/vg0-swap /dev/urandom swap,plain,cipher=aes-xts-plain64,size=256,hash=sha256
cdata /dev/mapper/vg0-data none noauto,luks,check=blkid,checkargs=ext4,tries=10
** Affects: cryptsetup (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug jammy
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cryptsetup in Ubuntu.
https://bugs.launchpad.net/bugs/2048681
Title:
cryptdisks_start will not read a passphrase from stdin
Status in cryptsetup package in Ubuntu:
New
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/vg0-data cdata 2>&1); then
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
ProcVersionSignature: Ubuntu 5.15.0-91.101-generic 5.15.131
Uname: Linux 5.15.0-91-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
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-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_GB.UTF-8
SHELL=/bin/bash
SourcePackage: cryptsetup
UpgradeStatus: No upgrade log present (probably fresh install)
cmdline: BOOT_IMAGE=/vmlinuz-5.15.0-91-generic root=/dev/mapper/vg0-root ro
crypttab:
# <target name> <source device> <key file> <options>
cswap /dev/mapper/vg0-swap /dev/urandom swap,plain,cipher=aes-xts-plain64,size=256,hash=sha256
cdata /dev/mapper/vg0-data none noauto,luks,check=blkid,checkargs=ext4,tries=10
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/2048681/+subscriptions
More information about the foundations-bugs
mailing list