AuthUserFile /www/courses/4350/2005Spr/.htpasswd AuthGroupFile /dev/null AuthName "my messages" AuthType Basic <Limit GET> require user penny </Limit>
EDIT LINES 1,3,7:
line #1, AuthUserFile: give the actual server file path/name of (future) password file, which should not be in the protected directory itself.
line #3, AuthName: give a string which will be used in the id/password prompt. Use "quotation marks" for a multi-word string):
*************************************************
* Enter username for <string> at <servername> *
* *
* User ID: ________________________ *
* Password: ________________________ *
*************************************************
In this example, the top line of the prompt would readline #7, user: give a single "User ID" which the user(s) is supposed to enter. Both the UserID and the password are chosen by you, as described below. This is not related to any existing login name; see NOTE.
Use with the -c option (create passwd file) and full path names, e.g.,
/usr/apache/bin/htpasswd -c /www/courses/4350/2005Spr/.htpasswd helen...using the same UserID mentioned in the .htaccess file. You will be prompted twice for a password, which is then stored in the .htpasswd file in encrypted form. (look at it!) Do NOT use an actual Unix account password for this purpose; this is a password for a different purpose, so make up something new and different.
On the other hand, it is harmless to use an existing login name for the UserID, since there is nothing particularly secret about login names. You may decide that it is simpler for that individual to let her existing login name serve as the UserID, but you do have to create a new password for her (perhaps one of her choosing) and make sure that she knows both the effective UserID, password, and the web directory for which they are used.
For typical classroom use you may want to make a web site viewable only to those taking a certain course, but not really care about a high level of security. In that case you may choose to create a single UserID with a single password, and inform everyone in that course of the same UserID/password, e.g., appm4350 and fourier. That is sufficient to keep out casual browsers.