Plymouth password handling.

LAHAYE Olivier olivier.lahaye at cea.fr
Tue Jul 3 16:22:05 UTC 2018


Hi,

I've written a complex them to handle systemimager imaging process.
Everythings works perfectly and I can even image a system and finish boot without rebooting.

I'm now in the process og having deployemnt onver an ssh tunnel.
My dracut module is able to handle local ssh keys, retreive a public key using curl or rsync, but a more simple way would be to ask for ssh password.

I'm testing on CentOS-7 latest update.

My theme (script) works fin asking for a password, but I'm totally unable to retreive it or use it.

I've tried 3 aproaches.
1/ without using the --command => unable to retreive the password from standard input.
SSHPASS="$(plymouth ask-for-password --prompt 'Please, enter password:')" sshpass -e ssh oscar-server 'hostname' > /tmp/result
=> Doesn't work. $SSHPASS is empty.

plymouth ask-for-password --prompt 'Please, enter password:' > /tmp/password
=> creates an empty password.

2/ using the --command => I must type the password twice???!!!
plymouth ask-for-password --prompt "Please, enter password:" --command "ssh my-server 'hostname'" --number-of-tries=3 > /tmp/result
=> 1st time I tiype password: the password dialog close when I hit enter. Then I type blindly and it works :-/
In text mode, I see the plymouth password prompt, I type the password, hit enter and then I get the ssh password propt, I reenter password and it works.

3/ using systemd-ask-password => doesn't display password dialog under plymouth and not available on centos-6...
SSHPASS="$(systemd-ask-password 'SSH password')" sshpass -e ssh oscar-server 'hostname' > /tmp/result
 => Works in text mode. In GUI mode, no password dialog appears.
=> Not available on centos-6 (that I have to support as it's still maintained).

Any advise or help would be greatly apreciated.

github theme source:
https://github.com/finley/SystemImager/tree/initrd-from-imageserver-and-dont-package-initrd/lib/dracut/modules.d/51systemimager/plymouth_theme

Inside this directory, my plymouth_test.sh script.

--
   Olivier LAHAYE
   CEA DRT/LIST/DIR
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/plymouth/attachments/20180703/84f6d5c0/attachment.html>


More information about the plymouth mailing list