xref: /openbsd/usr.bin/htpasswd/htpasswd.1 (revision 3bef86f7)
1.\"   $OpenBSD: htpasswd.1,v 1.9 2022/03/31 17:27:25 naddy Exp $
2.\"
3.\" Copyright (c) 2014 Florian Obser <florian@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: March 31 2022 $
18.Dt HTPASSWD 1
19.Os
20.Sh NAME
21.Nm htpasswd
22.Nd create and update user authentication files
23.Sh SYNOPSIS
24.Nm
25.Op Ar file
26.Ar login
27.Nm
28.Fl I
29.Op Ar file
30.Sh DESCRIPTION
31.Nm
32is used to create and update user authentication files for
33HTTP daemons.
34.Pp
35The options are as follows:
36.Bl -tag -width Ds
37.It Fl I
38Switch to batch mode.
39.Nm
40reads exactly one line from standard input and splits it at the first
41.Qo : Qc .
42The first part is the login, the second part is the password which
43.Nm
44then hashes using
45.Xr bcrypt 3 .
46.El
47.Pp
48.Nm
49prompts for a password and generates a hash using
50.Xr bcrypt 3 .
51A line suitable for a password file is written to the standard output.
52If invoked with two arguments
53.Po
54or one argument if the
55.Fl I
56flag is used
57.Pc ,
58user authentication
59.Ar file
60is updated.
61.Sh SEE ALSO
62.Xr bcrypt 3
63.Sh HISTORY
64This reimplemented version of
65.Nm
66has been available since
67.Ox 5.6 .
68.Sh AUTHORS
69.An Florian Obser Aq Mt florian@openbsd.org
70implemented
71.Nm
72from scratch after Apache httpd was removed from
73.Ox
74base.
75