How I am supposed to use
systemd-ask-password-console.service? My aim is to trigger a password prompt and ask for input on some terminal.
Currently I am trying it like this:
- Ensure that no other password agent is running:
ps aux | grep ask
- Ensure that no other password agent is to be started:
systemctl status systemd-ask*
systemd-ask-password --no-tty "Password:"to trigger the password agent.
Step 3 is waiting for an agent to return the password and finally times out. In the meantime the request can be seen within
systemctl status systemd-ask-password-console.service shows:
● systemd-ask-password-console.service - Dispatch Password Requests to Console Loaded: loaded (/lib/systemd/system/systemd-ask-password-console.service; static; vendor preset: Active: active (running) since Fri 2018-05-11 16:46:43 CEST; 6min ago Docs: man:systemd-ask-password-console.service(8) Main PID: 392 (systemd-tty-ask) Tasks: 2 (limit: 4915) CGroup: /system.slice/systemd-ask-password-console.service ├─392 /bin/systemd-tty-ask-password-agent --watch --console └─393 /bin/systemd-tty-ask-password-agent --watch --console=/dev/tty1 May 11 16:46:43 debian systemd: Started Dispatch Password Requests to Console.
I would expect that the running agent processes the request and that it will use some terminal (e.g. tty1) to ask for the password.
What I am doing wrong?