Comment # 8 on bug 954519 from
(In reply to Andrei Borzenkov from comment #7)
> 
> echo -e passwd\\npasswd | setsid /usr/bin/grub-mkpasswd-pbkdf2
> 
> this works.

Not really. So digging further

- GRUB does open /dev/tty, but reads from stdin
- the following works on openSUSE

10:~ # echo -e passwd\\npasswd | grub2-mkpasswd-pbkdf2 
Enter password: 
Reenter password: 
PBKDF2 hash of your password is
grub.pbkdf2.sha512.10000.56D496D4EB5A4C18232FC4185F34904235AC4F8DAE4D35F5870AB15EA98E2C6225923A8EAE7C938288E877AC3C0E9C9FEB0ACD650FE4C0B791ACB1216DFBC48A.CE8D053694643031D2A47D089BDA1CBEEA8DB074F000BE9BBE0CE6706ACD1A3B41FD4C4A8546833E5A13D28C164D8F4C9485568E9EDAFEFBD6A51291BE013282

- the following fails on openSUSE

10:~ # echo -e passwd\\npasswd | setsid grub2-mkpasswd-pbkdf2 
Enter password: 
Reenter password: grub2-mkpasswd-pbkdf2: error: failure to read password.
10:~ # 

- stracing YaST2 started from Xfce, there is no controlling tty which explains
why it fails.

Now we just have to find out why it fails without controlling tty :) I'm going
to build with some debugging now when I can easily reproduce it, but may be
someone has an idea.


You are receiving this mail because: