LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-03-2003, 10:49 PM   #1
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
apache 1.3.27, basic authentication problem


here is the section in question from my httpd.conf file:

<Directory /var/www/html/pics>
AuthName "VIP Area"
AuthType Basic
AuthUserFile /home/username/.pass
require user username
</Directory>


i added this at the end of my httpd.conf file so that i could make that paritcular directory password protected. to set it up i did the fllowing:
Code:
htpasswd -c /home/username/.pass username
it then asked me for the password (twice) and accepted it.

now, when i go to the page, i get the popup and it has my site name the AuthName "VIP Area" shows up and everything.....but when i enter the username and password, i cannot gain access to the information, it treats it as if either the user name is wrong, the password is wrong or both and i get the access denied page after like 3 tries.

i even went as far as making the .pass file readable by everyone (group user and other) but that didnt work either.

ideas?

Thanks
 
Old 06-05-2003, 02:31 AM   #2
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Original Poster
Rep: Reputation: 47
bump: just moving it up to see if i get a reply this time....im still lost on this one, i tried it again and even read it in a book.....still a no-go.

Last edited by Robert0380; 06-05-2003 at 02:32 AM.
 
Old 06-05-2003, 10:35 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
The problem is this:
Quote:
here is the section in question from my httpd.conf file:

<Directory /var/www/html/pics>
AuthName "VIP Area"
AuthType Basic
AuthUserFile /home/username/.pass
require user username
</Directory>
That configuration doesn't go in your httpd.conf file, you have to create a separate .htaccess file in the directory you want to protect.

Try searching on the subject, its brought up all the time as I know there is one going on in the Newbie forum as we speak.
 
Old 06-05-2003, 12:43 PM   #4
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Original Poster
Rep: Reputation: 47
yea, i saw that option listed but it also said it was recommended to not do it that way.....but if it works....im game.

oh, I have the wrox book Professional Apache...that's where i read that you should try to do it the other way. But like i said....whatever..doesnt matter to me, at this point i just want it to work.

Last edited by Robert0380; 06-05-2003 at 12:45 PM.
 
Old 06-08-2003, 09:43 AM   #5
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
It seems to me that you should try putting the password file (.pass) somewhere in the /var/www dir tree, and see if that works, I'm not sure that after startup when apache would normally go to a lower privelege level how far it's allowed to go to get at the files it needs.
 
Old 06-08-2003, 10:01 AM   #6
pk21
Member
 
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549

Rep: Reputation: 30
Does apache have read permissions on the .pass file?
 
Old 06-08-2003, 10:51 PM   #7
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Original Poster
Rep: Reputation: 47
i got this to work a few days ago, i just put the directives
in the .htaccess file and did the override directive. I didnt get it
to work with directives in the regular .conf file, but it's cool i guess.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Authentication problem... Dillius Linux - Software 5 03-02-2005 03:09 PM
[SOLVED] Apache basic authentication gypsy_rabbi Linux - Security 3 01-17-2005 09:09 PM
Apache Authentication Problem sbrewer Linux - Software 1 08-23-2004 02:24 PM
apache .htaccess basic authentication not working quite right kleptophobiac Linux - Software 3 01-10-2004 03:43 PM
Apache users - Basic login authentication with Apache2 piglingz Linux - Software 1 04-06-2003 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration