Skip to content

Commit

Permalink
Update the ftpasswd docs to mention the new/missing command-line opti…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
Castaglia committed Aug 2, 2016
1 parent 3c0a130 commit 9d4aa86
Showing 1 changed file with 42 additions and 17 deletions.
59 changes: 42 additions & 17 deletions doc/utils/ftpasswd.html
@@ -1,6 +1,3 @@
<!-- $Id: ftpasswd.html,v 1.2 2011-03-03 22:17:29 castaglia Exp $ -->
<!-- $Source: /home/proftpd-core/backup/proftp-cvsroot/proftpd/doc/utils/ftpasswd.html,v $ -->

<html>
<head>
<title>ftpasswd: tool for ProFTPD's AuthUserFile, AuthGroupFile, UserPassword </title>
Expand Down Expand Up @@ -67,20 +64,20 @@ <h2><a name="Usage">Usage</a></h2>
when not provided) and <code>--gecos</code> (not used by <code>proftpd</code>
at all). For example:
<pre>
ftpasswd --passwd --name=bob --uid=1001 --home=/home/bob --shell=/bin/false
$ ftpasswd --passwd --name=bob --uid=1001 --home=/home/bob --shell=/bin/false
</pre>
creates an account for user <code>bob</code>. To create a file with a name or
location other than the default (which, for <code>--passwd</code> mode is
<code>ftpd.passwd</code>), use the <code>--file</code> option. For example, to create the alternate password file in <code>/usr/local/etc/ftpd/passwd</code>:
<pre>
ftpasswd --passwd --file=/usr/local/etc/ftpd/passwd --name=bob --uid=1001 --home=/home/bob \
$ ftpasswd --passwd --file=/usr/local/etc/ftpd/passwd --name=bob --uid=1001 --home=/home/bob \
--shell=/bin/false
</pre>

<p>
For <code>AuthGroupFile</code>s, use <code>--group</code>:
<pre>
ftpasswd --group --name=<i>group-name</i> --gid=<i>group-id</i> --member=<i>user-member1</i> \
$ ftpasswd --group --name=<i>group-name</i> --gid=<i>group-id</i> --member=<i>user-member1</i> \
--member=<i>user-member2</i> ... --member=<i>user-memberN</i>
</pre>

Expand All @@ -89,7 +86,7 @@ <h2><a name="Usage">Usage</a></h2>
change a user's password. The <code>--change-password</code> option was
provided just for this scenario:
<pre>
ftpasswd --passwd --name=<i>user</i> --change-password
$ ftpasswd --passwd --name=<i>user</i> --change-password
</pre>

<p>
Expand All @@ -100,7 +97,7 @@ <h2><a name="Usage">Usage</a></h2>
password hash from the file. Easier, though, is to use <code>ftpasswd</code>'s
<code>--hash</code> option:
<pre>
ftpasswd --hash
$ ftpasswd --hash
</pre>
The password will either be prompted for, or it can be given on standard in
using <code>--stdin</code>.
Expand All @@ -123,7 +120,7 @@ <h2><a name="Usage">Usage</a></h2>
option is <code>--stdin</code>: this allows scripts to provide a password to
<code>ftpasswd</code> without prompting for a password. For example:
<pre>
echo <i>passwd-variable</i> | ftpasswd <i>opts</i> --stdin
$ echo <i>passwd-variable</i> | ftpasswd <i>opts</i> --stdin
</pre>
Note that the <code>--stdin</code> option does <b>not</b> allow passwords to
be passed to the script on the command line, but on <code>stdin</code>. This
Expand Down Expand Up @@ -211,6 +208,21 @@ <h2><a name="Options">Options</a></h2>
requests that a new password be given if the entered password
is the same as the current password.

--delete-user

Remove the entry for the given user name from the file.

-l Lock the password of the named account. This option disables a
--lock password by changing it to a value which matches no possible
encrypted value (it adds a '!' at the beginning of the
password).

--not-previous-password

Double-checks the given password against the previous password
for the user, and requests that a new password be given if
the entered password is the same as the previous password.

--not-system-password

Double-checks the given password against the system password
Expand All @@ -219,11 +231,19 @@ <h2><a name="Options">Options</a></h2>
helps to enforce different passwords for different types of
access.

--sha256 Use the SHA-256 algorithm for encrypting passwords.

--sha512 Use the SHA-512 algorithm for encrypting passwords.

--stdin
Read the password directly from standard in rather than
prompting for it. This is useful for writing scripts that
automate use of ftpasswd.

-u Unlock the password of the named account. This option
--unlock re-enables a password by changing the password back to its
previous value (to the value before using the -l option).

--use-cracklib
Causes ftpasswd to use Alec Muffet's cracklib routines in
order to determine and prevent the use of bad or weak
Expand All @@ -242,6 +262,10 @@ <h2><a name="Options">Options</a></h2>

Options:

--delete-group

Remove the entry for the given group name from the file.

--enable-group-passwd

Prompt for a group password. This is disabled by default,
Expand Down Expand Up @@ -272,6 +296,10 @@ <h2><a name="Options">Options</a></h2>
the specified output-file, an entry will be created for them.
Otherwise, the given fields will be updated.

--sha256 Use the SHA-256 algorithm for encrypting passwords.

--sha512 Use the SHA-512 algorithm for encrypting passwords.

--stdin
Read the password directly from standard in rather than
prompting for it. This is useful for writing scripts that
Expand Down Expand Up @@ -300,6 +328,10 @@ <h2><a name="Options">Options</a></h2>
--md5 Use the MD5 algorithm for encrypting passwords. This is the
default.

--sha256 Use the SHA-256 algorithm for encrypting passwords.

--sha512 Use the SHA-512 algorithm for encrypting passwords.

--stdin
Read the password directly from standard in rather than
prompting for it. This is useful for writing scripts that
Expand All @@ -315,18 +347,11 @@ <h2><a name="Options">Options</a></h2>
</pre>

<p>
<hr><br>

Author: <i>$Author: castaglia $</i><br>
Last Updated: <i>$Date: 2011-03-03 22:17:29 $</i><br>

<br><hr>

<font size=2><b><i>
&copy; Copyright 2000-2011 TJ Saunders<br>
&copy; Copyright 2000-2016 TJ Saunders<br>
All Rights Reserved<br>
</i></b></font>

<hr><br>

</body>
Expand Down

0 comments on commit 9d4aa86

Please sign in to comment.