I\'m trying to write some code to work with an htdigest password file. The documentation I can find seems to claim that the format of that file is:
user:real
Here is how you set the password for a given user.
sudo htdigest /etc/apache2/.htdigest yourrealm.com yourusername