cryptdisks_start will not read a passphrase from stdin

Bug #2048681 reported by EML
6
This bug affects 1 person
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/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

Revision history for this message
EML (eml1) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.