systemd-ask-password
Query the user for a system password. tldr-pages
On Linux
Linux
Query a system password with a specific prompt
systemd-ask-password "prompt"IdentifySpecify an identifier for the password query
systemd-ask-password --id identifier "prompt"IdentifyUse a kernel keyring key name as a cache for the password
systemd-ask-password --keyname key_name "prompt"IdentifySet a custom timeout for the password query
systemd-ask-password --timeout seconds "prompt"IdentifyForce the use of an agent system and never ask on current TTY
systemd-ask-password --no-tty "prompt"IdentifyStore a password in the kernel keyring without displaying it
systemd-ask-password --no-output --keyname key_name "prompt"IdentifyPipe a password to a command, stripping the trailing newline
systemd-ask-password -n | commandIdentifyDisplay help
systemd-ask-password --helpIdentify