#Usernames and passwords for the .htaccess system are stored in a file name .htpasswd
#These are stored each on a single line, in the form:
username:encryptedpassword
AuthUserFile /usr/local/etc/.htpasswd
AuthName "Name of Secure Area"
AuthType Basic
require valid-user

You can also put users into groups and allow access based on group. This is done by adding another file which specifies the groups.

The group file, which could be named (for example) .htgroups looks like this: