Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

How do I password protect a directory?

Quote Reply
How do I password protect a directory?
I was having problems. First with the 500 internal server errors. Then will empty frames. Now it's just warning me that my Admin directory is not password protected. How do I password protect a directory on a linux server?
Quote Reply
Re: Empty frames In reply to
foergive me if I'm wrong but could it be your nph-build.cgi giving you troubles, ie ... old version of perl??? it does need one of the newest perls to run 5.0053 or something like that. but then again I could be totally out of the ball park.

Hate to add this but are your configs set up correctly. might be worth a double check.

sorry, just a newbie w/o perl knowledge trying to help

Quote Reply
Re: How do I password protect a directory? In reply to
Create a .htaccess/.htpasswd file!

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: How do I password protect a directory? In reply to
Hi there,

You need to create a .htaccess file which should look like the following.

Code:
AuthUserFile /path/to/your/cgi-bin/admin/.htpasswd
AuthGroupFile /dev/null
AuthName "Links Administrator's Area"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>
Change the path to the path to your admin directory. Save it as htaccess.txt then upload it to your admin direcory in ASCII.

Then rename the file to .htaccess a wierd name i know but this is what it has to be called.

Next you need to telnet to your account, once you have logged in navigate to the admin directory.

To get a list of the directory you are in type dir


To navigate to the directory you type cd /directory

for example cd /home/cgi-bin/admin

Once you are in the admin directory type the following. from the prompt

.htpasswd -c .htpasswd username

Change username to the one you want!!!

Hit enter and you will be asked for your password enter it and then it will ask you to enter it again to confirm.

Once you have done this you should get a username and passwor box appear when you try and access the admin directory.

By typing the username and password you entered above you should gain access.

Hope this helps, let us know how you get on.





Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: How do I password protect a directory? In reply to
Hi

Check out the resource centre, under links modifications, NOT links 1.1 or Links 2.0, but just modifications, there is an online resource for creating .htaccess and .htpasswd files there.

Good Luck

DavyC

Quote Reply
Need to add second person In reply to
I use the same password all over the net. I want to all family members to look at my /personal/family directory. I have my password in there. How do I add a second user id and password. Using

htpasswd -c .htpasswd family

seems to wipe out the clydemoore user.

Quote Reply
Re: Need to add second person In reply to
Hi There,

The -c command creates a new file and overwrites the old one.

Type help htpasswd for a list of commands to add users.



Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: Need to add second person In reply to
Try my script at http://www.ace-installer.com/acepassword.html.

It allows you to password protect a directory with more than one user and it also generates the .htpasswd and .htaccess files. It has a 95% success rate, so you may want to try it.

Yours

A.J.Newby
webmaster@Ace-installer.com
http://www.ace-installer.com

Quote Reply
Re: How do I password protect a directory? In reply to
Don't know if it works on Linux but I'm a non-teccy with no understanding of the 'how' aspect of most things webby, but understand what works.

I used lockit from http://www.highlandmedia.net. VERY VERY VERY simple and it works.