411 REFERENCE · Wikipedia
.htpasswd
Reference material by Wikipedia contributors. This retains its source identity and is not 411 news reporting.
Flat-file for storage on Apache HTTP Server
.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.2023-05-15 Understanding Hidden Files and Folders in Your Home Directory – TecAdmin https://tecadmin.net/understanding-hidden-files-in-your-home-directory/ 2024-02-08 en-US The htpasswd command is used to manage .htpasswd file entries.David Jackson July 30, 2023 Mastering Htpasswd Command in Linux https://linuxtldr.com/htpasswd-command/ Linux TLDR
History
htpasswd was first added in the NCSA HTTPd server,NCSA httpd AuthUserFile https://www6.uniovi.es/~antonio/ncsa_httpd/setup/access/AuthUserFile.html 2024-02-08 www6.uniovi.es which is the predecessor to Apache.About the Apache HTTP Server Project - The Apache HTTP Server Project https://httpd.apache.org/ABOUT_APACHE.html 2024-02-08 httpd.apache.org The hash historically used "UNIX crypt" style with MD5 or SHA1 as common alternatives.htpasswd - Manage user files for basic authentication https://httpd.apache.org/docs/current/programs/htpasswd.html 2013-11-30 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.Password Formats - Apache HTTP Server Version 2.4 https://httpd.apache.org/docs/2.4/misc/password_encryptions.html 2024-02-08 Apache2023-12-20 HTTP authentication - HTTP MDN https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication 2024-02-08 developer.mozilla.org en-US
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.Services Chameleon Web 2014-03-24 Password Protect File or Folder using .htaccess Chameleon Web Services https://www.chameleon.co.uk/password-protect-file-or-folder-using-htaccess/ 2024-02-08 en-GB
Security issues
The only algorithm accepted by htpasswd that is still considered secure by today's standards is bcrypt,htpasswd file generator http://aspirine.org/htpasswd_en.html 2024-02-08 aspirine.org 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.
See also
Apache HTTP Server
Configuration file
References
External links
Apache: htpasswd - Manage user files for basic authentication
Category:Configuration files
Category:Web technology