If you want to restrict access to one of your web directories on a Unix server, the simplest way to do it is to create a .htaccess file in that directory.
Note: in what follows you will create an htaccess-username and an htaccess-password. (These are not your DuckID-username and DuckID-password that you use to log in to Blackboard.)
htpasswd -c htpasswd 111
Explanation:
htpasswd: the name of the Unix command
-c: the 'create file' switch. Omit if you are adding a password to an existing htpasswd file.
htpasswd: the name of the password file that is being created (or added to)
111: This is the HTaccess user-name.
Replace 111 with the number of the course you are in, e.g., 110, 111, 122, etc.
• The -c switch creates the file htpasswd if it does not exist. If the file does exist, the -c switch first deletes the existing file and
then creates a new one. To remember this, think "-c stands for create file".
• If you have already used this command to create an htpasswd file in another CIS class then omit the -c switch.
Example:
If your UO ID is: 950-62-4321
The 4th - 6th digits are: 624
Example:
If your UO ID is: 951-89-6291
The 4th - 6th digits are: 896
The command creates a file named htpasswd in your Unix home
directory; the file stores HTAccess usernames and HTAccess passwords.
You can add entries to this file later by
using same command but this time omitting the -c switch: htpasswd htpasswd 110
AuthUserFile /home7/susieQ/htpasswd
AuthGroupFile /dev/null
AuthName "CIS 111"
AuthType Basic
require user 111
Your browser will prompt you to enter the htaccess-username and htaccess-password.
If you are successful, you will see a directory listing for your course folder on the server.