logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: .htpasswd
Author
sb.net



Joined: 22 Sep 2006
Posts: 120
Location: USA

PostPosted: Sat 30 Sep '06 16:21    Post subject: .htpasswd Reply with quote

i have this htpasswd file:
Code:
user:DqjgdncYqVJeA

and this htaccess file:
Code:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile .htpasswd
AuthGroupFile /dev/null
require valid-user


It comes up with the login screen, but when i submit the username and password it comes up with this error.
Quote:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, something@something.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Am i doing anything wrong?


Last edited by sb.net on Sun 01 Oct '06 22:01; edited 1 time in total
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7364
Location: Germany, Next to Hamburg

PostPosted: Sat 30 Sep '06 17:46    Post subject: Reply with quote

AuthGroupFile /dev/null is from Unix system (trash / delete)! Do you have a folder /dev/null? Nope you have not!
Back to top
sb.net



Joined: 22 Sep 2006
Posts: 120
Location: USA

PostPosted: Sat 30 Sep '06 18:15    Post subject: Reply with quote

what do I put there
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sat 30 Sep '06 22:09    Post subject: Reply with quote

Try

Code:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /full/path/to/file/.htpasswd
require valid-user
Back to top
sb.net



Joined: 22 Sep 2006
Posts: 120
Location: USA

PostPosted: Sun 01 Oct '06 1:51    Post subject: Reply with quote

thanks, the error does not come up anymore. Now i have another problem. it keeps asking me for the username and password.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7364
Location: Germany, Next to Hamburg

PostPosted: Sun 01 Oct '06 13:10    Post subject: Reply with quote

sb.net wrote:
it keeps asking me for the username and password.


???? AuthType Basic is for asking the username and the password! What do you want to do?
Back to top
sb.net



Joined: 22 Sep 2006
Posts: 120
Location: USA

PostPosted: Sun 01 Oct '06 16:12    Post subject: Reply with quote

No when i type in the user name and password and press ok it asks up for it again (and again).
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7364
Location: Germany, Next to Hamburg

PostPosted: Sun 01 Oct '06 20:33    Post subject: Reply with quote

how did you create the .htpasswd file? Which encryption did you use?
Back to top
sb.net



Joined: 22 Sep 2006
Posts: 120
Location: USA

PostPosted: Sun 01 Oct '06 22:00    Post subject: Reply with quote

i do not know. i just went here, http://tools.dynamicdrive.com/password/ and made it. Confused The username and pass are: username:user pass:test.
Back to top
ali_fareed



Joined: 04 Jul 2006
Posts: 61
Location: Bahrain

PostPosted: Mon 02 Oct '06 7:54    Post subject: Reply with quote

I'm not sure but i think you have a unix crypt hash which isnt the default in windows use apr-1 md5 by using htpasswd.exe
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Mon 02 Oct '06 12:45    Post subject: Reply with quote

you should execute

htpasswd.exe -cs .htpasswd usernamehere

from your apache bin folder.
Back to top
sb.net



Joined: 22 Sep 2006
Posts: 120
Location: USA

PostPosted: Mon 02 Oct '06 18:35    Post subject: Reply with quote

That worked great Very Happy Thanks soooooooooooooo much!!!!
Why did the one in the internet not work? Is there one that works?
Back to top
ali_fareed



Joined: 04 Jul 2006
Posts: 61
Location: Bahrain

PostPosted: Mon 02 Oct '06 20:27    Post subject: Reply with quote

Jorge why add -s to htpasswd? sha is useful for migration from other servers like netscape but it is less secure than apache md5 because apache's variant is salted while sha isn't so an apache md5 will give many different hashes for the same password
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Tue 03 Oct '06 11:19    Post subject: Reply with quote

ali_fareed wrote:
Jorge why add -s to htpasswd? sha is useful for migration from other servers like netscape but it is less secure than apache md5 because apache's variant is salted while sha isn't so an apache md5 will give many different hashes for the same password


I had some problems shareing a password file using md5 between Win32 and Mac variants, I didn't have that with sha1

sb.net wrote:
That worked great Very Happy Thanks soooooooooooooo much!!!!
Why did the one in the internet not work? Is there one that works?


Why it didn't work?

the format was user:crypt(password)

the crypt command doesn't exist on windows.

I know of no web based one. I do have a php class that can be used to manage htpasswd files (= validate users, add users and delete users)
Back to top
sb.net



Joined: 22 Sep 2006
Posts: 120
Location: USA

PostPosted: Tue 03 Oct '06 17:56    Post subject: Reply with quote

ok, thank you. Very Happy
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Wed 04 Oct '06 10:33    Post subject: Reply with quote

Have a look here if you are interested:
http://www.apachelounge.com/viewtopic.php?t=635
Back to top


Reply to topic   Topic: .htpasswd View previous topic :: View next topic
Post new topic   Forum Index -> Apache