.htpasswd

.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 a dot to be hidden. The  command is used to manage .htpasswd file entries.

History
htpasswd was first added in the NCSA HTTPd server, which is the predecessor to Apache. The hash historically used "UNIX crypt" style with MD5 or SHA1 as common alternatives. In Apache 2.4, the bcrypt algorithm was added.

Usage
The file consists of lines, with each line containing a username, followed by a colon, followed by a string containing the hashed password optionally prepended by an algorithm specifier ("$2y$", "$apr1$" or "{SHA}") and/or salt. Athelstan:RLjXiyxx56D9s Mama:RLMzFazUFPVRE Papa:RL8wKTlBoVLKk

Resources available from the Apache HTTP Server can be restricted to just the users listed in the files created by htpasswd. The .htpasswd file can be used to protect the entire directory it is placed in, as well as particular files.

Security issues
The only algorithm accepted by htpasswd that is still considered secure by today's standards is bcrypt, and many formats do not use salting making it vulnerable to dictionary attacks. The crypt algorithm only uses the first 8 characters of any given password, discarding any past that.