htdigest file (Apache password storage)
Table of Contents
1 - About
.htdigest is a flat-file used to store:
- and passwords
for digest authentication of Apache HTTP Server.
The name of the file is given in the .htaccess configuration, and can be anything, but
.htdigest is the canonical name.
2 - Management
2.1 - htdigest command
This file is often maintained with the shell command “htdigest” which can add, and update users, and will properly encode the password for use.
The “htdigest” command is found in the apache2-utils package on dpkg package management systems and the httpd-tools package on RPM package management systems.
The syntax of the htdigest command:
htdigest [ -c ] passwdfile realm username
2.2 - Format
The format of the .htdigest file: