PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > The PowWeb Platform > .htaccess / Scheduled Jobs
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Closed Thread
 
Thread Tools
Old 5-11-04, 03:44 AM   #1
imagination
Guest
 
Posts: n/a
Can't login to .htaccess protected area

I've set up .htaccess and .htpasswd files in order to PW protect a directory. I double checked everything, but when I go to log in, it won't let me, it just keeps popping the login box down to me. Any help would be appreciated. Here is what I have:

.htaccess file is located in the folder that is to be protected:

AuthUserFile /www/n/natalieyoung/.htpasswd
AuthGroupFile /dev/null
AuthName "If you need a password, call Jon at (323)XXX-XXXX, ext 30."
AuthType Basic

require valid-user


.htpasswd is in the root folder, outside of htdocs:

userassword

------

I uploaded in text format and i set permissions to 640. Any ideas? I'm getting desperate here...

thanks .. .
 
Old 5-11-04, 03:48 AM   #2
NMS
Moderator
 
NMS's Avatar
 
Join Date: Apr 2002
Location: Malta - Europe
Posts: 7,108
Reputation: 125
Try this:

AuthUserFile /www/n/natalieyoung/.htpasswd
AuthGroupFile /dev/null
AuthName "If you need a password, call Jon at (323)XXX-XXXX, ext 30."
AuthType Basic
require user YYYYY


htpsswd

YYYYY: (encrypted password)
NMS is offline  
Old 5-11-04, 11:42 AM   #3
imagination
Guest
 
Posts: n/a
Still not working

Thanks for the suggestion. So I just tried that but it is still not working. Here is the error message:

Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Any other ideas?

Also, is there any way to get my entire AuthName to show up in Explorer? It is only showing the first few words.

Thanks for the help . .
 
Old 5-11-04, 12:00 PM   #4
grahm
 
Join Date: Nov 2001
Location: Does it matter?
Posts: 335
Reputation: 5
Try: AuthName "Testing"
Instead of: AuthName "If you need a password, call Jon at (323)XXX-XXXX, ext 30."

I've seen on occasion where the .htaccess file bombs with spaces in the AuthName field.
grahm is offline  
Old 5-11-04, 01:14 PM   #5
prince_ensign
Guest
 
Posts: n/a
Hey, I seem to be having the exact same problem. I have tried everything I can thing of. I just can't seem to get it to work. Any help would definatly be beneficial.
 
Old 5-11-04, 01:26 PM   #6
imagination
Guest
 
Posts: n/a
Can't login to .htaccess protected area

Ok, I tried used AuthName as "Testing" but still same problem, no change . . .?
 
Old 5-11-04, 03:53 PM   #7
(jj)
 
(jj)'s Avatar
 
Join Date: Feb 2002
Location: n/a
Posts: 7,294
Reputation: 224
What you first posted should have worked.

Did you create your files using Notepad or similar TEXT editor and NOT a word processor such as Word?
__________________
If silence is golden, then I must be worth million$

(jj)
Jack
(jj)'s Playground
(jj) is offline  
Old 5-11-04, 06:16 PM   #8
prince_ensign
Guest
 
Posts: n/a
I created my .htaccess files useing notepad, and uploaded them in ASCII mode. (I am haveing the same problem as imagination.)
 
Old 5-11-04, 06:39 PM   #9
vitriol
Guest
 
Posts: n/a
Make sure you have ENCRYPTED your password...(on .htpasswd ) because if you did't you gonna received that message again

"Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required."


I hope this help
 
Old 5-11-04, 07:39 PM   #10
(jj)
 
(jj)'s Avatar
 
Join Date: Feb 2002
Location: n/a
Posts: 7,294
Reputation: 224
You can encrypt your passwords HERE
__________________
If silence is golden, then I must be worth million$

(jj)
Jack
(jj)'s Playground
(jj) is offline  
Old 5-11-04, 07:42 PM   #11
prince_ensign
Guest
 
Posts: n/a
I tried again, makeing sure to encypt my password (as I have done in the past) and I made sure that everything was right. It still does the same thing. (haveing same problem as "imagination"-see above).

Can anyone suggest alternatives to htaccess?
 
Old 5-11-04, 07:52 PM   #12
vitriol
Guest
 
Posts: n/a
Try this:

AuthUserFile /www/n/natalieyoung/.htpasswd
AuthGroupFile /dev/null
AuthName "If you need a password, call Jon at (323)XXX-XXXX, ext 30."
AuthType Basic

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



Hope it help!
 
Old 5-11-04, 08:40 PM   #13
prince_ensign
Guest
 
Posts: n/a
Still no luck.
 
Old 5-12-04, 03:56 AM   #15
Croc Hunter
Mod.. with bite..
 
Croc Hunter's Avatar
 
Join Date: Sep 2002
Location: Australia
Posts: 7,306
Reputation: 449
Double check your www/u/username in OPS

prince ensign: paste your code here or pm it to me.

Both of you: I'm a moderator on the forum here so you can pm me your FTP user info FTP server# and the folder to protect in confidence and I'll see if I can get it to work. Or send your request and details to support.
__________________
Croc Hunter MSC :
Croc Hunter is offline  
Old 5-12-04, 04:12 PM   #16
svanneste
Guest
 
Posts: n/a
same problem here. surely the servers
 
Old 5-12-04, 04:15 PM   #17
tbonekkt
 
Join Date: Dec 2002
Location: TX
Posts: 12,382
Reputation: 248
Is everyone here having this problem on the same webserver? If not, we can practically rule out it being a server issue.
tbonekkt is offline  
Old 5-12-04, 04:29 PM   #18
svanneste
Guest
 
Posts: n/a
Tom,
I am using www06
 
Old 5-13-04, 06:29 PM   #19
prince_ensign
Guest
 
Posts: n/a
Well, I still havn't had any luck, but I have learned a few things. I e-mailed support, and asked what the correct server path was. They told me it was:
"The actual path should be
/www/e/ensigntechnologies.com." So I tried this code:

AuthUserFile /www/e/ensigntechnologies.com/.htpasswd
AuthGroupFile /dev/null
AuthName "Login"
AuthType Basic

require ensignshop


Thats the latest version of the .htaccess file.

.htpasswd file reads

ensignshopMy Encypted Password)

I am on server www13

Of course, in my Ops page it says that my FTP (Home) Directory is /www/e/ensigntech

I don't know which it is, I've tried both. Neither works.

(My primary FTP user name was going to be ensigntechnologies, like they suggest during the setup, however, it was too long, so it had to be shortened).

Last edited by prince_ensign; 5-13-04 at 06:44 PM..
 
Old 5-14-04, 12:25 AM   #20
Croc Hunter
Mod.. with bite..
 
Croc Hunter's Avatar
 
Join Date: Sep 2002
Location: Australia
Posts: 7,306
Reputation: 449
You're all set now prince ensign.

The .htaccess goes inside the folder to protect.
__________________
Croc Hunter MSC :
Croc Hunter is offline  
Old 5-14-04, 03:49 PM   #21
prince_ensign
Guest
 
Posts: n/a
Hey guys, Croc Hunter helped me configure my script and he used
"require valid-user" in place of "require (username)". I didn't notice any other differences in mine, other than the placement of the .htaccess file, however, I had tried differnet places for the file previuosly, to no avail. Still, it could have been the problem, as well. Anyway, good luck getting yours to work- I'm sure croc hunter will help you as well.

Thanks Croc Hunter, I appreciate it!
 
Old 5-14-04, 04:54 PM   #22
Arria
 
Join Date: Jul 2002
Location: here
Posts: 77
Reputation: 5
I posted the following back in March and it helped the people at that time. I honestly think what worked was to *delete* not overwrite the files on the server...


I had a lot of problems getting this to work. ***First delete the files that are currently on your website.***

.htaccess looks like this:

Code:
AuthUserFile /www/p/puser/.htpasswd AuthGroupFile /dev/null AuthName "Login" AuthType Basic require user userID
Replace userID with the name/ID required to login.

I also suggest redoing your .htpasswd file to be safe. Remember that these are case-sensitive - PassWord is not the same as password

As has been said already, make sure you use something like notepad to create/save/change files and upload in ASCII.

Just repeating as a reminder.
Arria is offline  
Old 5-16-04, 04:12 AM   #23
Ed_Borg
Guest
 
Posts: n/a
Did you all get yours to work? I just found this thread. I have been running this thread in the CGI threads today. I still can't get it to work. [update] (jj) showed me where I was messing up. When it says NO word wrap, it means it. I was still hitting enter to do the next line. I guess can't do that.

http://forum.powweb.com/showthread.php?t=36956

Last edited by Ed_Borg; 5-16-04 at 07:52 AM..
 
Old 5-17-04, 01:28 PM   #24
prince_ensign
Guest
 
Posts: n/a
Well, I had the word wrap disabled, but I used the enter key to create to next line. So, did you just use the space bar, or what did you do to separate the lines of code?

I did get it to work with some help
 
Old 5-17-04, 06:02 PM   #25
Ed_Borg
Guest
 
Posts: n/a
I had been using "Enter" but that's why mine wasn't working. After I got some help also, mine now just runs alll together in one lonnng line. Then he told me about using a different editor besides "Notepad" specifically designed for this stuff. Like listed in the Utilities forum, in this thread:

http://forum.powweb.com/showthread.php?t=28618

A couple good ones he mentioned were:

UltraEdit 32

Notepad++

or Notepad Plus

Good luck. Ed
 
Old 8-9-04, 02:56 PM   #26
mikeccc
Guest
 
Posts: n/a
require [U]user[/U] userID

This worked for me. I've been without password-protection for a month or so, and tried everything else. What finally got it going was adding the word "user" in the last line of the .htaccess file ("require user userID" instead of "require userID"). Thanks!
 
Old 8-23-04, 09:58 AM   #27
HaCk
Guest
 
Posts: n/a
IŽve tried everythnig iŽve read here, but my password system is still not working. I donŽt know what else to do. Please, could anybody help me? There is not a definitely solution for this? Any templates for htaccess & htpasswd files???

HELP :'(
 
Old 8-23-04, 10:44 AM   #28
extras
on hiatus
 
Join Date: Mar 2004
Location: Canada
Posts: 5,815
Reputation: 314
Use sitemanager.
http://YOURSITE.COM/+sitemanager

First, go into the directory you want to protect,.
Then, in the .htacces tab, there is password protection corner.
extras is offline  
Old 8-23-04, 01:34 PM   #29
HaCk
Guest
 
Posts: n/a
ouuuooo. thanks a lot, but I have just solved my problem. My problem was a problem of "location" of the htpasswd file. The correct place is not the same directory than htaccess, but the same than htdocs. anyway iŽll try that.

thanks a lot

HaCk
 
Old 9-7-04, 10:34 AM   #30
hgoodson
 
Join Date: Jan 2002
Posts: 52
Reputation: 5
I had A password Protected Fold working Just fine Until about a week Ago. And all of a Sudden it will NOT take the USername and Password..
IS it Possible that one of the Files .htaccess or .htpasswd got Corrupt on the Sever..
IS there any thing that any of you Know that would just stop it from Working on it's On. The TEch Support At POWWEB looked at it and Couldn't get it to Work. They Didn't know why it stop Working..

.htaccess
-----------------
AuthUserFile /www/m/muuvvweb/.htpasswd
AuthGroupFile /dev/null
AuthName "Private Member's Only - Password Required"
AuthType Basic

<Limit GET>
require user member
</Limit>



Thanks
Henry
hgoodson is offline  
Old 9-7-04, 11:40 AM   #31
extras
on hiatus
 
Join Date: Mar 2004
Location: Canada
Posts: 5,815
Reputation: 314
Remove (temporary) your own code in htaccess, and try sitemanager.
http://YOURSITE.COM/+sitemanager

If it works, there was something wrong with your code (or passwordfile).
You can check timestamp, size, or checksum (if you care to create) of files
to see if they are altered.
extras is offline  
Old 9-7-04, 12:55 PM   #32
hgoodson
 
Join Date: Jan 2002
Posts: 52
Reputation: 5
Thanks
That Seems to have done it..
Site Builders is Pretty Slow But IT WOrked..
Maybe It Will Fox my Frontpage Login Problems.
ANd Boy If it Could restore My Other Website..

HEHE

Thanks Again
Henry
hgoodson is offline  
Old 9-7-04, 02:22 PM   #33
extras
on hiatus
 
Join Date: Mar 2004
Location: Canada
Posts: 5,815
Reputation: 314
Ahh... if you are using FrontPage, you may want to post your .htaccess,
and ask Rick_E to take a look at it.

I don't use FP because I consider it as a retarded system
and I've seen many people cracked through FP.

I reguraly see crackers trying to publish bad pages into my site.
As i don't have FP extension setup, it does not affect me, though.
extras is offline  
Old 9-25-04, 05:00 PM   #34
Oleg
Registered
 
Join Date: Sep 2004
Location: Ru
Posts: 15
Reputation: 5
same prob

Have registered today and came to exactly the same problem.

.htaccess (in a folder to protect)

AuthUserFile /www/o/oleg/.htpasswd
AuthGroupFile /dev/null
AuthName "Authorization"
AuthType Basic
require user oleg


.htpasswd (in htdocs folder)
oleg:fcdNfnwGUtUv2

1) "oleg" is my ftp-account name, not an OPS account (but i've tried both).
2) both files were made in notepad. uploaded in ascii. downloaded and viewed to be sure - everything is fine. site does not accept my login/password and displays 401 error page.
3) +sitemanager reports "internal server error" when i try to login.
4) this might be interesting, but my old basic php-password-protect system refused to work on powweb servers. here it is:
Code:
<? function error ($error_message) { echo $error_message."<BR>"; exit;} if (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']) && 1 /*passwd verify code removed*/) { //success } else { header("WWW-Authenticate: Basic realm=\"Authorization\""); header("HTTP/1.0 401 Unauthorized"); error("Unauthorized access atempt..."); } ?>
what confuses me is that both $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW']) are always blank. even after browser displays a dialog box for username/password and I type there something, script runs again and reposts that these variables are blank.

So, back to the subject. Need some assist/help with password protection for the folders.
Oleg is offline  
Old 9-25-04, 05:02 PM   #35
B&T
Just tryin' to help
 
B&T's Avatar
 
Join Date: Jan 2003
Location: along the journey
Posts: 8,036
Reputation: 125
Quote:
Originally Posted by Oleg
.htaccess (in a folder to protect)

AuthUserFile /www/o/oleg/.htpasswd
AuthGroupFile /dev/null
AuthName "Authorization"
AuthType Basic
require user oleg

.htpasswd (in htdocs folder)
oleg:fcdNfnwGUtUv2
Based on what you have above, the .htpasswd file should NOT be in htdocs but above htdocs, at the ftp root level.

And you do not need this line:
AuthGroupFile /dev/null

tutorial here:
http://prettyworthless.com/tips.php?tip=protect#tip
__________________
Enhance your PowWeb experience @ B&T's Tips & Scripts
Got some free time? You can find Nothing of Value @ PrettyWorthless.com
B&T is offline  
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:10 PM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright © 2000-2007 Jelsoft Enterprises Limited.