Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #264441

zfs load-key on boot randomly reports wrong password if I type too fast

From cen <imbacen@gmail.com>
Newsgroups linux.debian.user
Subject zfs load-key on boot randomly reports wrong password if I type too fast
Date 2023-12-08 21:30 +0100
Message-ID <HIPDX-ceLd-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi

I have an encrypted ZFS volume which I unlock at boot time using this 
systemd service:

[Unit]
DefaultDependencies=no
After=zfs-import.target
Before=zfs-mount.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/zfs load-key -a
StandardInput=tty-force

[Install]
WantedBy=zfs-mount.service


I have a very weird issue that.. if I type too fast the password is 
wrong. I know this sounds weird but it's true..

I can type the same password fast and it is wrong, then I type it very 
slowly the third time and it works.

I feel like it must be some weird thing with the boot terminal input 
rate or key detection but I have no clue where to start looking.

Unfortunately the prompt has no *** char masking so I am not even sure 
if keys are being registered or what is happening below.

I also have encrypted boot drive which unlocks first but that terminal 
looks different and has no issues.

I also tried a few other ways to load but I can't get either to work:

#ExecStart=/usr/bin/bash -c 'systemd-ask-password "ZFS password" 
--no-tty | zfs load-key -a'
#ExecStart=plymouth ask-for-password --prompt="Password for zfs" 
--number-of-tries=5 --command="/usr/sbin/zfs load-key -a"


Any clues welcome

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

zfs load-key on boot randomly reports wrong password if I type too  fast cen <imbacen@gmail.com> - 2023-12-08 21:30 +0100
  Re: zfs load-key on boot randomly reports wrong password if I type  too fast David <bouncingcats@gmail.com> - 2023-12-08 22:00 +0100
    Re: zfs load-key on boot randomly reports wrong password if I type  too fast cen <imbacen@gmail.com> - 2023-12-11 22:00 +0100
  Re: zfs load-key on boot randomly reports wrong password if I type  too fast David Wright <deblis@lionunicorn.co.uk> - 2023-12-08 22:20 +0100

csiph-web