University of MD College of Arts and Humanities University of Maryland College of Arts
       and Humanities University of Maryland

Home: Technology: Academic Technology

Password Projecting a Web Page Using a Password Database

To password protect a web page, it must be located in a password- protected directory. To create a password-protected directory, you will need to do the following.

First, you will need to use a telnet application to connect to calliope.arhu.umd.edu. You should use a secure telnet application such as F-Secure (Windows), Fugu (Mac), or Terminal (Mac). ARHU Computing Services staff install F-Secure on all Windows machines supported by the College. OIT provides documentation for using F-Secure as a telnet client. Both Fugu and Terminal are available on all College-supported Macs running OS X. Documentation for Fugu is available at the University of Michigan's site (click on the link for documentation). Instructions for using Terminal on the Mac can be found on the OIT Help Desk site.

Once connected to calliope.arhu.umd.edu, change to the directory where your web files are stored. For example,

cd /export/software/arhu/engl/www/englfac/joesmith/

Use the following steps to create a directory to store the Passwords:

  1. Create a directory in which to store the password file:
    mkdir passwords
  2. Change into the directory you just created
    cd passwords
  3. Create the password file with the username and password you'd like people to use to access your password-protected web page. You can establish more than one username and password in this step; just repeat the command for each username.
    dbmanage .htpassword adduser username
    (Replace username with the username you'd like people to type to access the page.)
  4. You'll be asked for a password. Type the password, press return, and then type the password again. This will be the password used to access the web page.
  5. Go back out of your passwords directory
    cd ..

Next, create a directory to store the protected files:

  1. Create a directory for your password protected web page.
    mkdir private
    (You can use whatever directory name you like; we have used the name private)
  2. Change into the directory you just created.
    cd private
  3. Create a text file called .htaccess containing the following (you might type pico -w .htaccess to begin creating the file):

    AuthType Basic
    AuthName ByPassword
    AuthDBUserFile /yourdeptdirectory/passwords/.htpassword
    <Limit GET>
    require user username
    </Limit>


    (Replace /yourdeptdirectory/ with your relevant directories. It might look something like this:
    /export/software/arhu/engl/www/englfac/joesmith/passwords/.htpassword


    Replace username with the username you want people to type to access the page, the same username you chose above. If you used pico to create the file, save it using control-O, press return, and then use control-X to exit. If you created more than one username in step 3, you can allow multiple users access by putting additional require user username lines in the .htaccess file, one for each username.)

That's it! Now, just put the web page you'd like to protect into the private directory. To access the page, point your web browser to:

http://yournormalurl/private/filename.html

(Where filename.html is the name of your password-protected web page, and yournormalurl is your web address. For example: http://www.english.umd.edu/englfac/joesmith/private/images.html.)

You should see a small window pop up, asking you for the username and password. Type in the username and password, and you'll be able to access the web page.

picture of username/password box

Back to Top

Outreach Programs Admissions Technology Student Resources Outreach Programs Academics About the College home Contact us with questions, comments and feedback: arhu-academictech@umail.umd.edu
Search the Arts and Humanities web site