Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Hypermart : Password Protect not Working?

Quote Reply
Hypermart : Password Protect not Working?
I've put both of these files in my admin directory.. I am getting the password prompt, I enter Al as the user name, and my own password, but it doesn't accept it? What did I do wrong?
Here are my two files:

my .htaccess file is:

AuthName ByPassword
AuthType Basic
<Limit GET POST>
require user Al
</Limit>

my .htpasswd file is
Username:Al

Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Okay...which script are you using?????

Wink

You posted this in the DBMAN Discussion Forum where I already posted a Reply.

Regards,

Eliot Lee
Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Hi

I accidently posted it in the wrong forum, so I reposted it here.. Sorry about that.. it's been a long day

Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Eliot,

I am using Links 2.0

Al

Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Have you read the FAQ in the Resource Center???

Your .htaccess file looks wrong....

If you are using Apache 1.2 or above, then you should use the following codes:

Code:

AuthUserFile /absolute/path/to/.htpasswd
AuthGroupFile /dev/null
AuthName "Admin Area"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>


Change /absolute/path/to/ to the ABSOLUTE path where your .htpasswd file is located.

Then if the FAQ in the Resource Center does not help...

Try using the .htaccess tutorial found in my hosting company's web site to create the .htpasswd file:

http://faq.web2010.com/htaccess.htm

Regards,


Eliot Lee
Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
the url is http://nursingmall.hypermart.net/cgi-bin/links/admin so would my Absolute path be /nursingmall.hypermart.net/cgi-bin/links/admin ??


Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
No...Hypermart's absolute paths have been posted before in this Forum..search for Hypermart Paths in this forum in the forum's search form.

Regards,

Eliot Lee
Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Hi Eliot..

OK, I'm getting really frustrated with this. I know the path that I used for the other links in my links.cfg file is /data1/hypermart.net/nursingmall .. so then my absolute path would be /data1/hypermart.net/nursingmall/cgi-bin/links/admin .. Same thing happens, the password prompt comes up and asks for a username and password.. what do I enter?

Al

Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
As Eliot stated you need to point the path to where your .htpasswd file is NOT the directory of where your links admin is. So all you need to do is create a file called .htpasswd and place that in a directory of your choice...this file will contain the username and password that you have created. So now you have two files:
1).htaccess (this file will point to .htpasswrd)
2).htpasswd (this file will contain your username and password)

There are several methods of encrypting your password..which offhand I'm not sure of. Anyway, your path should look someting like this:

/data1/hypermart.net/nursingmall/cgi-bin/directory_name/.htpasswd

...then when that box pops up you will enter the username and password that you have placed in the file.

Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
This is my newest config..

AuthUserFile /data1/hypermart.net/nursingmall/cgi-bin/links/admin/.htpasswd
AuthGroupFile /dev/null
AuthName "Admin Area"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>


But it's still not going?


Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
YOU need to create the .htpasswd file...Did you even check out the .htaccess tutorial I linked????

Regards,

Eliot Lee
Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Yes, I always had the htpasswd file, and it was linked from the other file.

Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Code:
Yes, I always had the htpasswd file, and it was linked from the other file.
Most likely a malformatted file! Because I think you mentioned before that you only had the user name in the .htpasswd file.

Typical .htpasswd files look like the following:

Code:

user:95LpmhYNEOLNKMN


The stuff after the : is the encrypted password of the user.

Again, follow the instructions in the .htaccess tutorial I linked to create a PROPER .htpasswd file!!!

Regards,



Eliot Lee
Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
This is what I did..

Here is the link to my admin.cgi file...

http://nursingmall.hypermart.net/cgi-bin/links/admin/admin.cgi

My .htaccess file is as follows (under your recommendations) (it's located in http://nursingmall.hypermart.net/cgi-bin/links/admin/

AuthUserFile /data1/hypermart.net/nursingmall/cgi-bin/links/.htpasswd
AuthGroupFile /dev/null
AuthName Admin Area
AuthType Basic
<Limit GET>
require valid-user
</Limit>

My .htpasswd file is as follows (I added the .htpasswd file in the http://nursingmall.hypermart.net/cgi-bin/links)

aljane:ve7hen

----------------------

I uploaded both of these files in ascii mode. I get the passord prompt when I access http://nursingmall.hypermart.net/cgi-bin/links/admin/admin.cgi

I enter aljane as the user name, and ve7hen as the password but it's brings me to an error page after several tries? Try it out..


Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
Eliot,

My password isn't encrypted.. I tried telnet to access hypermart to make my .htpasswd but I could connect to hypermart in this manner.

Al

Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
In Reply To:
My password isn't encrypted.. I tried telnet to access hypermart to make my .htpasswd but I could connect to hypermart in this manner.
Try reading the FAQ in the Resource Center about creating .htaccess and .htpasswd files via FTP....which I have suggested before.

If that doesn't help you...then all I can say is "best of luck"!

Regards,

Eliot Lee
Quote Reply
Re: Hypermart : Password Protect not Working? In reply to
I have always found the Gossamer Threads FileMan script very useful for password protecting a directory. You might want to download and install it and then use it to password protect your directories. It is very useful for more than just password protection.

- Bobsie
bobsie@orphanage.com