What is "htpasswd"
The archive .htpasswd
is a simple file used to store usernames and password for basic authentication of Apache HTTP Server. The file name is given by the htaccess, and it could be anything, but .htpasswd
is the canonical name. The file name begins with a dot, because most operating systems Unix-like considers any file that starts with point to be hidden. This file is often maintained with the shell command "htpasswd", which can add, delete, and update users, and will correctly encode the password to use (so that it is easily checked but not reverted back to the original password).
The file is composed of rows, each row corresponds to a separate user name and password hash pair with the two dots between them. The hash is typically "UNIX crypt" style md5 or sha1 as common alternatives.
Resources available from the server HTTP Apache can be restricted to only the users listed in the file created by .htpasswd
.