Help - Password protecting directories
-
- A semi-regular
- Posts: 19
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sat Jan 08, 2011 8:23 pm
Help - Password protecting directories
Hey guys,
I am following the instructions here: http://www.nfoservers.com/forums/viewto ... =19&t=3736 however I must have done something wrong and can't figure out what.
After following those instructions I attempted to login to my password protected directory, but instead it brought me to my custom error page. Now when I try to access that directory again it brings me straight to the error page, without letting me attempt to login again. I am fairly confident that I used the correct login information that I used.
The only thing I can think of is when I created the password hash, I ticked the MD5 box. Am I not supposed to?
Cheers!
I am following the instructions here: http://www.nfoservers.com/forums/viewto ... =19&t=3736 however I must have done something wrong and can't figure out what.
After following those instructions I attempted to login to my password protected directory, but instead it brought me to my custom error page. Now when I try to access that directory again it brings me straight to the error page, without letting me attempt to login again. I am fairly confident that I used the correct login information that I used.
The only thing I can think of is when I created the password hash, I ticked the MD5 box. Am I not supposed to?
Cheers!
Re: Help - Password protecting directories
Yes, you will need to use a regular password and not an MD5 one.
Re: Help - Password protecting directories
Thanks,
However now I seem to be locked out of the directory haha. Anytime I try to go to it, it takes me to my error page.
If I disable the .htaccess and .htpasswd files then I can access it, but while theyre enabled it wont let me.
However now I seem to be locked out of the directory haha. Anytime I try to go to it, it takes me to my error page.
If I disable the .htaccess and .htpasswd files then I can access it, but while theyre enabled it wont let me.
Re: Help - Password protecting directories
Okay I was able to generate a normal hash and not an MD5 hash. I uploaded that to my .htpasswd and tried to access the directory again, but it still didn't work. I used the login info I made and it still sent me to my error page.
Not quite sure what i'm doing wrong at this point. In the .htaccess, for this line:
AuthUserFile /usr/www/USERNAME/DIRECTORY_TO_PROTECT/.htpasswd
Username is the username given to me by nfo for the ftp to my website, correct?
Then in .htpasswd for this line:
LOGIN_NAME:HASHED_PASSWORD
LOGIN_NAME is anything I want it to be, correct? I can make one up?
Then HASHED_PASSWORD, I made a new password, put it in the hash generator, then copy pasted the Hashed password.
Anything i'm doing wrong?
Not quite sure what i'm doing wrong at this point. In the .htaccess, for this line:
AuthUserFile /usr/www/USERNAME/DIRECTORY_TO_PROTECT/.htpasswd
Username is the username given to me by nfo for the ftp to my website, correct?
Then in .htpasswd for this line:
LOGIN_NAME:HASHED_PASSWORD
LOGIN_NAME is anything I want it to be, correct? I can make one up?
Then HASHED_PASSWORD, I made a new password, put it in the hash generator, then copy pasted the Hashed password.
Anything i'm doing wrong?
Re: Help - Password protecting directories
Yes, that's correct. It is your identifier (all lowercase).winds wrote:Username is the username given to me by nfo for the ftp to my website, correct?
Yes.LOGIN_NAME is anything I want it to be, correct? I can make one up?
That is correct, yes.Then HASHED_PASSWORD, I made a new password, put it in the hash generator, then copy pasted the Hashed password.
Re: Help - Password protecting directories
Hm, so it seems I did everything correctly. Any idea why I wouldn't be able to log in successfully?
Re: Help - Password protecting directories
Could you post your .htaccess and .htpasswd full files here?
Re: Help - Password protecting directories
You can just paste them directly here, in
Code: Select all
blocks :). Easier, faster, and more permanent than doing an attachment or uploading them somewhere else.
Re: Help - Password protecting directories
Ahhh right, haha, my bad!
htaccess
htpasswd
htaccess
Code: Select all
# Access file
order allow,deny
allow from all
require valid-user
Authname "DirectoryName"
Authtype Basic
AuthUserFile /usr/www/website/admin/.htpasswd
Code: Select all
admin:ghfN47dN7cEUo
Re: Help - Password protecting directories
Hmm, that does appear to be correct.
Re: Help - Password protecting directories
When logging into the directory, with those files, my login details would be:
Username: admin
Password: the password I typed in to get hashed, not the actual hashed password, right?
I don't know what else I could be doing wrong. Tried many times without success.
Username: admin
Password: the password I typed in to get hashed, not the actual hashed password, right?
I don't know what else I could be doing wrong. Tried many times without success.
Re: Help - Password protecting directories
Yes, that's correct.
Re: Help - Password protecting directories
Hmm, do you have any ideas why it wouldn't be working?
Re: Help - Password protecting directories
Not very many, unfortunately. You could triple-check that the files are in the right places and with the right permissions, and make sure that there isn't a .htaccess in another folder that's changing the URL.