]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd-ask-password.xml
mount-util: shorten the loop a bit (#7545)
[thirdparty/systemd.git] / man / systemd-ask-password.xml
index 10bb529b812911780cb8e3bbaf232d76f7092510..686fa89468eef4f75ed5b97902746fcff5e77231 100644 (file)
@@ -3,6 +3,8 @@
   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
 
 <!--
+  SPDX-License-Identifier: LGPL-2.1+
+
   This file is part of systemd.
 
   Copyright 2011 Lennart Poettering
     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 <option>--no-tty</option> it will query
-    the password system-wide and allow active users to respond via
-    several agents. The latter is only available to privileged
-    processes.</para>
+    run with no TTY or with <option>--no-tty</option> it will use the
+    system-wide query mechanism, which allows active users to respond via
+    several agents, listed below.</para>
 
     <para>The purpose of this tool is to query system-wide passwords
-    -- that is passwords not attached to a specific user account.
+     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.</para>
     <itemizedlist>
 
       <listitem><para>A boot-time password agent asking the user for
-      passwords using Plymouth</para></listitem>
+      passwords using
+      <citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      </para></listitem>
 
       <listitem><para>A boot-time password agent querying the user
-      directly on the console</para></listitem>
+      directly on the console —
+      <citerefentry><refentrytitle>systemd-ask-password-console.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      </para></listitem>
 
       <listitem><para>An agent requesting password input via a
-      <citerefentry
-      project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-      message</para></listitem>
-
-      <listitem><para>A command line agent which can be started
-      temporarily to process queued password
-      requests</para></listitem>
+      <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+      message —
+      <citerefentry><refentrytitle>systemd-ask-password-wall.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      </para></listitem>
 
       <listitem><para>A TTY agent that is temporarily spawned during
       <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
-      invocations</para></listitem>
+      invocations,</para></listitem>
+
+      <listitem><para>A command line agent which can be started
+      temporarily to process queued password
+      requests — <command>systemd-tty-ask-password-agent --query</command>.
+      </para></listitem>
     </itemizedlist></para>
 
+    <para>Answering system-wide password queries is a privileged operation, hence
+    all the agents listed above (except for the last one), run as privileged
+    system services. The last one also needs elevated privileges, so
+    should be run through
+    <citerefentry project='die-net'><refentrytitle>sudo</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    or similar.</para>
+
     <para>Additional password agents may be implemented according to
     the <ulink
-    url="http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">systemd
+    url="https://www.freedesktop.org/wiki/Software/systemd/PasswordAgents">systemd
     Password Agent Specification</ulink>.</para>
 
     <para>If a password is queried on a TTY, the user may press TAB to
         cache for the password. If set, then the tool will try to push
         any collected passwords into the kernel keyring of the root
         user, as a key of the specified name. If combined with
-        <option>--accept-cached</option> it will also try to retrieve
-        the such cached passwords from the key in the kernel keyring
-        instead of querying the user right-away. By using this option
+        <option>--accept-cached</option>, it will also try to retrieve
+        such cached passwords from the key in the kernel keyring
+        instead of querying the user right away. By using this option,
         the kernel keyring may be used as effective cache to avoid
         repeatedly asking users for passwords, if there are multiple
         objects that may be unlocked with the same password. The
         possible to cache multiple passwords under the same keyname,
         in which case they will be stored as NUL-separated list of
         passwords. Use
-        <citerefentry><refentrytitle>keyctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+        <citerefentry project='die-net'><refentrytitle>keyctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
         to access the cached key via the kernel keyring
         directly. Example: <literal>--keyname=cryptsetup</literal></para></listitem>
       </varlistentry>
         <term><option>--accept-cached</option></term>
 
         <listitem><para>If passed, accept cached passwords, i.e.
-        passwords previously typed in. </para></listitem>
+        passwords previously entered.</para></listitem>
       </varlistentry>
 
       <varlistentry>
         This will output one password per line.</para></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><option>--no-output</option></term>
+
+       <listitem><para>Do not print passwords to standard output.
+       This is useful if you want to store a password in kernel
+       keyring with <option>--keyname</option> but do not want it
+       to show up on screen or in logs.</para></listitem>
+      </varlistentry>
+
       <xi:include href="standard-options.xml" xpointer="help" />
     </variablelist>
 
     <title>See Also</title>
     <para>
       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>keyctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-ask-password-console.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
+      <citerefentry><refentrytitle>systemd-tty-ask-password-agent</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
+      <citerefentry project='die-net'><refentrytitle>keyctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
       <citerefentry project='die-net'><refentrytitle>plymouth</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
       <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
     </para>