Page 1 of 2 12 LastLast
Results 1 to 35 of 40

Thread: Can't login to .htaccess protected area

  1. #1
    imagination
    Guest

    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 .. .

  2. #2
    Moderator NMS's Avatar
    Join Date
    Apr 2002
    Location
    Malta - Europe
    Posts
    7,108
    Rep Power
    24
    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)

  3. #3
    imagination
    Guest

    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 . .

  4. #4

    Join Date
    Nov 2001
    Location
    Does it matter?
    Posts
    335
    Rep Power
    16
    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.

  5. #5
    prince_ensign
    Guest
    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.

  6. #6
    imagination
    Guest

    Can't login to .htaccess protected area

    Ok, I tried used AuthName as "Testing" but still same problem, no change . . .?

  7. #7
    (jj)'s Avatar
    Join Date
    Feb 2002
    Location
    n/a
    Posts
    7,296
    Rep Power
    25
    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

  8. #8
    prince_ensign
    Guest
    I created my .htaccess files useing notepad, and uploaded them in ASCII mode. (I am haveing the same problem as imagination.)

  9. #9
    vitriol
    Guest
    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

  10. #10
    (jj)'s Avatar
    Join Date
    Feb 2002
    Location
    n/a
    Posts
    7,296
    Rep Power
    25
    You can encrypt your passwords HERE
    If silence is golden, then I must be worth million$

    (jj)
    Jack
    (jj)'s Playground

  11. #11
    prince_ensign
    Guest
    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?

  12. #12
    vitriol
    Guest
    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!

  13. #13
    prince_ensign
    Guest
    Still no luck.

  14. #14

  15. #15
    Mod.. with bite.. Croc Hunter's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    7,333
    Rep Power
    27
    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 :

  16. #16
    svanneste
    Guest
    same problem here. surely the servers

  17. #17

    Join Date
    Dec 2002
    Location
    TX
    Posts
    12,382
    Rep Power
    29
    Is everyone here having this problem on the same webserver? If not, we can practically rule out it being a server issue.

  18. #18
    svanneste
    Guest
    Tom,
    I am using www06

  19. #19
    prince_ensign
    Guest
    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 07:44 PM.

  20. #20
    Mod.. with bite.. Croc Hunter's Avatar
    Join Date
    Sep 2002
    Location
    Australia
    Posts
    7,333
    Rep Power
    27
    You're all set now prince ensign.

    The .htaccess goes inside the folder to protect.
    Croc Hunter MSC :

  21. #21
    prince_ensign
    Guest
    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!

  22. #22

    Join Date
    Jul 2002
    Location
    here
    Posts
    77
    Rep Power
    16
    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.

  23. #23
    Ed_Borg
    Guest
    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 08:52 AM.

  24. #24
    prince_ensign
    Guest
    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

  25. #25
    Ed_Borg
    Guest
    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

  26. #26
    mikeccc
    Guest

    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!

  27. #27
    HaCk
    Guest
    Ive tried everythnig ive read here, but my password system is still not working. I dont 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 :'(

  28. #28
    on hiatus
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    5,815
    Rep Power
    0
    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.

  29. #29
    HaCk
    Guest
    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 ill try that.

    thanks a lot

    HaCk

  30. #30

    Join Date
    Jan 2002
    Posts
    52
    Rep Power
    16
    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

  31. #31
    on hiatus
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    5,815
    Rep Power
    0
    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.

  32. #32

    Join Date
    Jan 2002
    Posts
    52
    Rep Power
    16
    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

  33. #33
    on hiatus
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    5,815
    Rep Power
    0
    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.

  34. #34
    Registered
    Join Date
    Sep 2004
    Location
    Ru
    Posts
    15
    Rep Power
    0

    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.

  35. #35
    Just tryin' to help B&T's Avatar
    Join Date
    Jan 2003
    Location
    along the journey
    Posts
    8,036
    Rep Power
    24
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •