1SYSTEMD-ASK-PASSWORD(1)      systemd-ask-password      SYSTEMD-ASK-PASSWORD(1)
2
3
4

NAME

6       systemd-ask-password - Query the user for a system password
7

SYNOPSIS

9       systemd-ask-password [OPTIONS...] [MESSAGE]
10

DESCRIPTION

12       systemd-ask-password may be used to query a system password or
13       passphrase from the user, using a question message specified on the
14       command line. When run from a TTY it will query a password on the TTY
15       and print it to standard output. When run with no TTY or with --no-tty
16       it will use the system-wide query mechanism, which allows active users
17       to respond via several agents, listed below.
18
19       The purpose of this tool is to query system-wide passwords — that is
20       passwords not attached to a specific user account. Examples include:
21       unlocking encrypted hard disks when they are plugged in or at boot,
22       entering an SSL certificate passphrase for web and VPN servers.
23
24       Existing agents are:
25
26       ·   A boot-time password agent asking the user for passwords using
27           plymouth(8),
28
29       ·   A boot-time password agent querying the user directly on the
30           console — systemd-ask-password-console.service(8),
31
32       ·   An agent requesting password input via a wall(1) message — systemd-
33           ask-password-wall.service(8),
34
35       ·   A TTY agent that is temporarily spawned during systemctl(1)
36           invocations,
37
38       ·   A command line agent which can be started temporarily to process
39           queued password requests — systemd-tty-ask-password-agent --query.
40
41       Answering system-wide password queries is a privileged operation, hence
42       all the agents listed above (except for the last one), run as
43       privileged system services. The last one also needs elevated
44       privileges, so should be run through sudo(8) or similar.
45
46       Additional password agents may be implemented according to the systemd
47       Password Agent Specification[1].
48
49       If a password is queried on a TTY, the user may press TAB to hide the
50       asterisks normally shown for each character typed. Pressing Backspace
51       as first key achieves the same effect.
52

OPTIONS

54       The following options are understood:
55
56       --icon=
57           Specify an icon name alongside the password query, which may be
58           used in all agents supporting graphical display. The icon name
59           should follow the XDG Icon Naming Specification[2].
60
61       --id=
62           Specify an identifier for this password query. This identifier is
63           freely choosable and allows recognition of queries by involved
64           agents. It should include the subsystem doing the query and the
65           specific object the query is done for. Example:
66           "--id=cryptsetup:/dev/sda5".
67
68       --keyname=
69           Configure a kernel keyring key name to use as cache for the
70           password. If set, then the tool will try to push any collected
71           passwords into the kernel keyring of the root user, as a key of the
72           specified name. If combined with --accept-cached, it will also try
73           to retrieve such cached passwords from the key in the kernel
74           keyring instead of querying the user right away. By using this
75           option, the kernel keyring may be used as effective cache to avoid
76           repeatedly asking users for passwords, if there are multiple
77           objects that may be unlocked with the same password. The cached key
78           will have a timeout of 2.5min set, after which it will be purged
79           from the kernel keyring. Note that it is possible to cache multiple
80           passwords under the same keyname, in which case they will be stored
81           as NUL-separated list of passwords. Use keyctl(1) to access the
82           cached key via the kernel keyring directly. Example:
83           "--keyname=cryptsetup"
84
85       --timeout=
86           Specify the query timeout in seconds. Defaults to 90s. A timeout of
87           0 waits indefinitely.
88
89       --echo
90           Echo the user input instead of masking it. This is useful when
91           using systemd-ask-password to query for usernames.
92
93       --no-tty
94           Never ask for password on current TTY even if one is available.
95           Always use agent system.
96
97       --accept-cached
98           If passed, accept cached passwords, i.e. passwords previously
99           entered.
100
101       --multiple
102           When used in conjunction with --accept-cached accept multiple
103           passwords. This will output one password per line.
104
105       --no-output
106           Do not print passwords to standard output. This is useful if you
107           want to store a password in kernel keyring with --keyname but do
108           not want it to show up on screen or in logs.
109
110       -h, --help
111           Print a short help text and exit.
112

EXIT STATUS

114       On success, 0 is returned, a non-zero failure code otherwise.
115

SEE ALSO

117       systemd(1), systemd-ask-password-console.service(8), systemd-tty-ask-
118       password-agent(1), keyctl(1), plymouth(8), wall(1)
119

NOTES

121        1. systemd Password Agent Specification
122           https://www.freedesktop.org/wiki/Software/systemd/PasswordAgents
123
124        2. XDG Icon Naming Specification
125           http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
126
127
128
129systemd 239                                            SYSTEMD-ASK-PASSWORD(1)
Impressum