|This article needs additional citations for verification. (December 2013)|
.htpasswd is a flat-file used to store usernames and password for basic authentication on an Apache HTTP Server. The name of the file is given in the .htaccess configuration, and can be anything although ".htpasswd" is the canonical name. The file name starts with a dot, because most Unix-like operating systems consider any file that begins with dot to be hidden. This file is often maintained with the shell command "htpasswd" which can add, delete, and update users, and will properly encode the password for use (so that it is easily checked, but not reversed back to the original password).
The file consists of rows, each row corresponding to a pair of username and hashed password separated by a colon. The hash historically used "UNIX crypt" style with MD5 or SHA1 as common alternatives, although as of version 2.2.18 MD5 is now the default.
Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by htpasswd. Htpasswd file can be used to protect the entire directory it is placed in, as well as particular files.
- Apache: htpasswd - Manage user files for basic authentication
- "htpasswd - Manage user files for basic authentication". Retrieved 2013-11-30.
|This World Wide Web-related article is a stub. You can help Wikipedia by expanding it.|