systemd/man/systemd-ask-password.html
2015-02-17 11:22:16 +01:00

66 lines
6.8 KiB
HTML

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-ask-password</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-ask-password"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-ask-password — Query the user for a system password</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-ask-password [OPTIONS...] [MESSAGE]</code> </p></div></div><div class="refsect1"><a name="idm140324624283792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>systemd-ask-password</strong></span> may be used to query
a system password or passphrase from the user, using a question
message specified on the command line. When run from a TTY it will
query a password on the TTY and print it to standard output. When
run with no TTY or with <code class="option">--no-tty</code> it will query
the password system-wide and allow active users to respond via
several agents. The latter is only available to privileged
processes.</p><p>The purpose of this tool is to query system-wide passwords
-- that is passwords not attached to a specific user account.
Examples include: unlocking encrypted hard disks when they are
plugged in or at boot, entering an SSL certificate passphrase for
web and VPN servers.</p><p>Existing agents are: a boot-time password agent asking the
user for passwords using Plymouth; a boot-time password agent
querying the user directly on the console; an agent requesting
password input via a
<a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
message; an agent suitable for running in a GNOME session; a
command line agent which can be started temporarily to process
queued password requests; a TTY agent that is temporarily spawned
during
<a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>
invocations.</p><p>Additional password agents may be implemented according to
the <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents" target="_top">systemd
Password Agent Specification</a>.</p><p>If a password is queried on a TTY, the user may press TAB to
hide the asterisks normally shown for each character typed.
Pressing Backspace as first key achieves the same effect.</p></div><div class="refsect1"><a name="idm140324620533328"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--icon="><span class="term"><code class="option">--icon=</code></span><a class="headerlink" title="Permalink to this term" href="#--icon="></a></dt><dd><p>Specify an icon name alongside the password
query, which may be used in all agents supporting graphical
display. The icon name should follow the <a class="ulink" href="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" target="_top">XDG
Icon Naming Specification</a>.</p></dd><dt id="--timeout="><span class="term"><code class="option">--timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#--timeout="></a></dt><dd><p>Specify the query timeout in seconds. Defaults
to 90s. A timeout of 0 waits indefinitely. </p></dd><dt id="--echo"><span class="term"><code class="option">--echo</code></span><a class="headerlink" title="Permalink to this term" href="#--echo"></a></dt><dd><p>Echo the user input instead of masking it.
This is useful when using
<code class="filename">systemd-ask-password</code> to query for
usernames. </p></dd><dt id="--no-tty"><span class="term"><code class="option">--no-tty</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tty"></a></dt><dd><p>Never ask for password on current TTY even if
one is available. Always use agent system.</p></dd><dt id="--accept-cached"><span class="term"><code class="option">--accept-cached</code></span><a class="headerlink" title="Permalink to this term" href="#--accept-cached"></a></dt><dd><p>If passed, accept cached passwords, i.e.
passwords previously typed in.</p></dd><dt id="--multiple"><span class="term"><code class="option">--multiple</code></span><a class="headerlink" title="Permalink to this term" href="#--multiple"></a></dt><dd><p>When used in conjunction with
<code class="option">--accept-cached</code> accept multiple passwords.
This will output one password per line.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd></dl></div></div><div class="refsect1"><a name="idm140324620519952"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure code
otherwise.</p></div><div class="refsect1"><a name="idm140324624422736"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
<a href="http://linux.die.net/man/8/plymouth"><span class="citerefentry"><span class="refentrytitle">plymouth</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
</p></div></div></body></html>