.\" -*- nroff -*- .\" The Merecat web server stems from both sthttpd and thttpd, both of .\" which are free software under the 2-clause simplified BSD license. .\" .\" Copyright (c) 1995-2015 Jef Poskanzer .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNERS OR CONTRIBUTORS BE .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .Dd Aug 3, 2019 .Dt htpasswd 1 .Os "merecat (2.32)" .Sh NAME .Nm htpasswd .Nd Create and update user authentication files .Sh SYNOPSIS .Nm .Op Fl cm .Ar FILE .Ar USERNAME .Sh DESCRIPTION .Nm is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users. Resources available from the Merecat web server can be restricted to just the users listed in the files created by htpasswd. This program can only be used when the usernames are stored in a flat-file. .Pp This manual page only lists the command line arguments for .Nm . For details of the directives necessary to enable user authentication in the web server, see .Xr merecat 8 , the Merecat httpd README, or the GitHub project home page .Aq https://github.com/troglobit/merecat . .Sh OPTIONS .Bl -tag -width Ds .It Fl c Create, or recreate the .htpwassd file, .Ar FILE , if it already exists. .It Fl m Use MD5 encryption for passwords, this is tested at runtime. So this option is simply for compatibility with other similar tools. .It Ar FILE Name of the file to contain the user name and password, usually .htpasswd. If .Fl c is given, this file is created if it does not already exist, or deleted and recreated if it does exist. .It Ar USERNAME The username to create or update in passwdfile, .Ar FILE . If username does not exist is this file, an entry is added. If it does exist, the password is changed. .El .Sh SEE ALSO .Xr merecat 8 .Sh AUTHORS .An Rob McCool Aq robm@stanford.edu originally wrote .Nm for NCSA httpd. It then (naturally) made its way to Apache and other web servers, like Roxen Challenger. .An Jef Poskanzer Aq jef@mail.acme.com modified it 29aug97 to accept new password on stdin, if stdin is a pipe or file. This is necessary for use from CGI.