password protection

password protection

Posted by: tomt
Posted on: 2007-10-29 12:45:00

I am trying to password protect a directory using .htaccess but am
failing to get the page despite providing correct password.
.htaccess and .htpasswd are in same dir that requires protection.

.htaccess reads:
AuthType Basic
AuthUserFile /.htpasswd
AuthName "Private Area"
require valid-user

.htpasswd reads:
user:password

I get the login window but fail to authenticate despite providing
login/password provided in .htpasswd.

Any suggestios? Thanks

Re: password protection

Posted by: wwtdlp
Posted on: 2007-10-29 13:29:00

> .htpasswd reads:
> user:password

Should be like

.htpasswd reads:
user:zGKlu.8k8n08U

after password conversion.

Try here?
http://wiki.dreamhost.com/Password-protecting_directories


Re: password protection

Posted by: monkeyboy7706
Posted on: 2007-10-29 13:32:00

I usually just use the password protection option from the panel. Its under Goodies >> htaccess.

Does it for you in a few minutes

Re: password protection

Posted by: tomt
Posted on: 2007-10-29 15:13:00

Thanks for the suggestions.
I don't wish to have WebDAV overwrite my other .htaccess file so am
unable to use that.
Despite encrypting the password - now 'user:encrypted-form' still
unable to get it working.
Could you please advise if path to 'AuthUserFile' above is correct or
if it should be in root - and if there could be a problem with
permissions?

Re: password protection

Posted by: rlparker
Posted on: 2007-10-29 16:14:00

In reply to:

I don't wish to have WebDAV overwrite my other .htaccess file so am unable to use that.


Although both .htaccess password protection and WebDAV are both set up from the same panel page, WebDAV is not at all involved with the .htaccess password protection process. Just make sure you don't check any of the "WebDAV" stuff on the panel page.

You can always just rename your existing .htaccess file to something (orig_htaccess, for example), use the panel Password Protection tool to set up you .htpasswd file and manage your user/password combinations (which will create a new ".htaccess" file), and then merge the contents of your original .htaccess file into it with a text editor.

At least that way you will know that you have correctly encrypted passwords and valid entries n the .htpasswd file. wink

In reply to:

Despite encrypting the password - now 'user:encrypted-form' still unable to get it working.


How did you encrypt the password(s)?

In reply to:

Could you please advise if path to 'AuthUserFile' above is correct or if it should be in root - and if there could be a problem with permissions?


I can't comment on your permissions (I don't know how they are set), but you could put the 'AuthUserFile' anywhere you want and it shouldn't make any difference as long as you have detailed the full path correctly in the .htaccess file.

--rlparker

Re: password protection

Posted by: tomt
Posted on: 2007-10-29 17:42:00

Took your advice and got it working thru WebDAV - will download the
file shortly to see how they set it up.

"How did you encrypt the password(s)?" - at tools.jcisio.

Many thanks for the help.



Tags: htpasswdhtaccesspassword protectionpassword protectcorrect passwordprivate areaauthenticate