At the moment our server is configured to allow access to certain actions—like writing to our subversion repository—only to authenticated users. Now we need to actually allow our users to perform these actions by storing their authentication details. These are stored in a text file that Apache understands— the projects.passwd
file referred to in the earlier excerpts.
Creating this file is quite simple using the htpasswd
tool provided by Apache, which should be accessible simply by its name on Linux or at C:\Program Files\Apache Group\Apache2\bin\htpasswd.exe
for Microsoft Windows. We need to explicitly tell it to create a new file the first time, and which file to use for subsequent user additions.
For a first run, we use the following:
$ htpasswd -c /projects/projects.password joe
We will be prompted to specify and then confirm the password for our user joe
. Alternatively we can specify the password as part of the command if we use the -b
parameter, although we...