<?xml version="1.0" encoding="UTF-8"?>
<refentry id="afppasswd.1">
  <refmeta>
    <refentrytitle>afppasswd</refentrytitle>

    <manvolnum>1</manvolnum>

    <refmiscinfo class="date">01 May 2024</refmiscinfo>

    <refmiscinfo class="source">Netatalk</refmiscinfo>
    <refmiscinfo class="manual">Netatalk AFP Fileserver Manual</refmiscinfo>
    <refmiscinfo class="version">@netatalk_version@</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>afppasswd</refname>

    <refpurpose>AFP Random Number UAM password maintenance
    utility</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>afppasswd</command>

      <arg>-acfn</arg>

      <arg>-p <replaceable>afppasswd file</replaceable></arg>

      <arg>-u <replaceable>minimum uid</replaceable></arg>

      <arg>-w <replaceable>password string</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para><command>afppasswd</command> creates and maintains an afppasswd
    file, which supplies the user credentials for the "Randnum exchange" and
    "2-Way Randnum exchange" User Authentication Modules.</para>

    <para><command>afppasswd</command> can either be called by root with
    parameters to manage all user credentials, or by local system users with
    no parameters to change their own AFP passwords.</para>

    <note>
      <para>With this utility you can only change the passwords used by these
      two Random Number UAMs. As they provide only weak password encryption,
      their use is discouraged unless one has to support very old AFP clients
      that can not deal with the more secure "DHX" or "DHX2" UAMs.</para>
    </note>
  </refsect1>

  <refsect1>
    <title>Example</title>

    <para>Local user changing their own password:</para>

    <screen><prompt>example%</prompt> <userinput>afppasswd</userinput>
<computeroutput>Enter NEW AFP password:</computeroutput> <userinput>(hidden)</userinput>
<computeroutput>Enter NEW AFP password again:</computeroutput> <userinput>(hidden)</userinput>
<computeroutput>afppasswd: updated password.</computeroutput>
</screen>
  </refsect1>

  <refsect1>
    <title>Options</title>

    <variablelist remap="TP">
      <varlistentry>
        <term><option>-a</option></term>

        <listitem>
          <para>Add a new user to the <command>afppasswd</command>
          file.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-c</option></term>

        <listitem>
          <para>Create and/or initialize <command>afppasswd</command> file or
          specific user.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-f</option></term>

        <listitem>
          <para>Force the current action.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-p</option><replaceable> path</replaceable></term>

        <listitem>
          <para>Path to <command>afppasswd</command> file.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-n</option></term>

        <listitem>
          <para>If cracklib support is built into <emphasis
          remap="B">netatalk</emphasis> this option will cause cracklib
          checking to be disabled, if the superuser does not want to have the
          password run against the cracklib dictionary.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-u</option><replaceable> minimum
        uid</replaceable></term>

        <listitem>
          <para>This is the minimum <emphasis remap="I">user id</emphasis>
          (uid) that <command>afppasswd</command> will use when creating
          users.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><option>-w</option><replaceable> password string</replaceable></term>

        <listitem>
          <para>Use string as password, instead of typing it interactively.
          Please use this option only if absolutely necessary, since the
          password may remain in the terminal history in plain text.</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>See Also</title>

    <para><citerefentry>
        <refentrytitle>afpd</refentrytitle>

        <manvolnum>8</manvolnum>
      </citerefentry>, <citerefentry>
        <refentrytitle>afp.conf</refentrytitle>

        <manvolnum>5</manvolnum>
      </citerefentry>.</para>
  </refsect1>

  <refsect1>
    <title>Author</title>

    <para>See <ulink url='https://netatalk.io/contributors'>CONTRIBUTORS</ulink></para>
  </refsect1>
</refentry>
