ManticMoo.COM -> Jeff's Articles -> Web Hacks -> Creating a password file with Apache's htpasswd command

Creating a password file with Apache's htpasswd command

by Jeffrey P. Bigham

Creating a password file with Apache's htpasswd command is relatively easy and straightforward. Simply issue the following command:


htpasswd -c /path/to/your/password/file/passwords username

You will then be asked for a password for the username specified above. Enter this and your password file will be created! It's as easy as that!

Adding Users to Your Password File

After creating your password file, the next natural step is to add users to it. Do this by issuing the following command:


htpasswd /path/to/your/password/file/passwords username


You will be prompted for a password once again and after you enter one, username will be added to your password file. It's as easy as that!

ManticMoo.COM -> Jeff's Articles -> Web Hacks -> Creating a password file with Apache's htpasswd command