Password Protecting Opal & Ruby Web Directories

There are two methods to password protect your web directories on the opal and ruby servers.

1. UNC Onyen authentication:

Each user home directory includes a file named ONYEN-AUTHENTICATION.txt. Follow the instructions in that file to Onyen password protect a web directory.

2. Non-Onyen passwords:
  1. Log on to your opal or ruby account (via SSH).

  2. Change to your public_html directory (cd public_html).

  3. Either create a new directory to password protect ( mkdir newdirectory) or change to the one you want to protect (cd). Choose a subdirectory of public_html; otherwise, your entire public_html will become password-protected.

  4. At the prompt, type htdirpass.pl

  5. When prompted, enter the user name and password that you would like your users to use.

The htdirpass.pl script creates two files in the directory you are protecting: .htaccess and .htpasswd. You won't see these files on a regular ls command; you must type ls -a. Don't delete the files unless you want to remove the password protection.