Gossamer Forum
Quote Reply

I need help! I don't know how to password protect the admin. I tried with the site faq.web2010.com/telnet.html but I can't do it...

Can anyone help me to password protect my admin or do it for me???


Quote Reply
Re: Password In reply to
If you login via telnet, then do this:

1. Enter the command "cd admindir" where, "admindir" is the path to your links admin directory. If you have problems, type the full path just as you have it defined in links.cfg.

2. Once you are in your admin directory, you need to create a file called ".htaccess". This file looks like this:

AuthType Basic
AuthName "Links Administrator"
AuthGroupFile /dev/null
AuthUserFile /path/to/.htpasswd

require valid-user

The only line you need to change is the one that begins with AuthUserFile. You need to change the path to a directory where you will create another file called, ".htpasswd". This should be a directory that only you can view or access. In your case, it is probably best if you create this file offline and then ftp it in ASCII mode to your admin directory.

After the .htaccess file is created, go to the directory where you want to put the .htpasswd file. The .htpasswd file will hold your username and encrypted password that you will use to enter the admin directory. To create the file once you are in the directory, type the command:

htpasswd -c .htpasswd username

where the "username" is the name you want to use. The system will create the .htpasswd file and ask you twice to enter a password for this username. Once you have done so, the username and password is saved in the .htpasswd file and your admin directory is now protected.

To test it, quit your telnet session, close your browser completely down, and restart it. Then try to run your admin script. A window should pop up in your browser asking for your username and password. Once you have entered both successfully, the admin.cgi script will load. If you do not match what you set in .htpasswd, you will be denied access (but asked if you want to try again -- I think you get 3 tries).

If you have problems, contact your ISP for assistance. They should be glad to help you; if they are any good, that is. Wink

[This message has been edited by Bobsie (edited March 01, 1999).]
Quote Reply
Re: Password In reply to
I also emailed Bobsie this question tonight!

I don't have Telnet access as of yet (my server hasn't set it up yet) so I needed a different way.
Luckily, you're on the right website if you're in the same bind as I am. (Oh how I long to have Telnet again... I miss it! Smile)

Gossamer's FileMan is the perfect little script to let you do this from a web interface. Just set the fileman.cgi to your root directory and you've got full control and can password protect whatever you want.

More and more kudos daily to Alex. Smile