Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old October 7th, 2001, 01:11 PM
etherwolf's Avatar
etherwolf etherwolf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Aspen area
Posts: 89 etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 h 34 m 52 sec
Reputation Power: 8
Send a message via ICQ to etherwolf
Unhappy page requires login when I refresh or change pages

The funny thing is, it didn't do this until last week, which is making me all kinds of paranoid...

Anyway, I'm running a RH7.1 box with apache 1.3.20 and mod_auth_smb, and I'm authenticating against my WinNT 4 domain controller so I don't have to maintain a local password list.

This works fine, and worked perfectly up until last week, when it started insisting that every time I refresh a page, it again prompts me for my password. It also asks me occasionaly when I go to a new page, but usually not when I have a page that links to itself... Sometimes if I cancel, it gives me an error, sometimes it displays the page anyway.

My .htaccess file is located in the root of my site (intranet) and the area I'm working on right now is one directory below the root.

My .htaccess file looks like so:
Authname "name"
AuthType Basic
Auth_SMB_Server ntserver
Auth_SMB_Domain ntdomain
require valid-user

My virtual host setup in httpd.conf is:
NameVirtualHost myipaddress
<VirtualHost domainname>
ServerAdmin webmaster@domainname
DocumentRoot /usr/local/www/net/htdocs/
ServerName domainname
ErrorLog logs/net.error_log
</VirtualHost>

My directory setup for it is:
<Directory "/usr/local/www/net/htdocs">
Options Indexes MultiViews
AllowOverride AuthConfig
Order deny,allow
Allow from all
</Directory>

Any ideas on why I'm getting these damned login prompts?

Also, any obvious security holes in the above setup? (I can post the rest of my httpd.conf if anyone is kind enough to analyze it)

Thanks!!!

# Nathan

Reply With Quote
  #2  
Old October 7th, 2001, 05:14 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> <VirtualHost domainname>

Change to <VirtualHost myipaddress>

>> DocumentRoot /usr/local/www/net/htdocs/

Change to: DocumentRoot "/usr/local/www/net/htdocs"

>> Order deny,allow
>> Allow from all

Remove them

>> My .htaccess file looks like so

Why can't you do it in httpd.conf? .htaccess is for those who don't have access to httpd.conf and the ones who want to do something dynamic.

BTW, I don't know how mod_auth_smb works because I haven't tried it. If possible, change Auth_SMB_Server ntserver to its IP address.

Reply With Quote
  #3  
Old October 8th, 2001, 09:13 AM
etherwolf's Avatar
etherwolf etherwolf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Aspen area
Posts: 89 etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 h 34 m 52 sec
Reputation Power: 8
Send a message via ICQ to etherwolf
Okay, I changed the virtualhost, removed the trailing slash from my documentroot, and removed the order/allow lines. I will attempt to figure out how to do all my htaccess stuff in httpd.conf.

A quick update; after restarting httpd with the above changes made, I'm getting a prompt to login for EVERY picture I have on that site... so maybe 10 prompts just to see my index page. Thank goodness most of my site after the index is text only!

I'll muck around with my conf file and see if I can't get rid of this.

Thanks for your help, freebie :-)

# Nathan

Reply With Quote
  #4  
Old October 8th, 2001, 09:22 AM
etherwolf's Avatar
etherwolf etherwolf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Aspen area
Posts: 89 etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 h 34 m 52 sec
Reputation Power: 8
Send a message via ICQ to etherwolf
Still not working...

Okay, apparently mod_auth_smb does not allow IP addresses in the Auth_SMB_Server directive.

I put all my htaccess info into the <Directory> section of my conf file, and changed my AllowOverride to None. Apache restarts ok, but I'm still having to enter a password for every single file my browser has to go get.

Any other ideas?

Reply With Quote
  #5  
Old October 8th, 2001, 09:50 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> but I'm still having to enter a password for every single file

With another mod_auth_*, usually that happens when the protected directory is a symlink or an alias. If that's the case, add the appropriate <Directory "/path/to/protected/dir">

>> any obvious security holes in the above setup?

I forgot to reply this. There is a critical security hole in all version of Apache prior to 1.3.21 (will be released in a few days). When MutiViews is enabled, visitors can bypass your DirectoryIndex page and see your directory listing with the query string of ?M=D. I see that you have specified Indexes, which will let everyone to see your directory listing when your DirectoryIndex file is not present. So you probably should disable that.

Reply With Quote
  #6  
Old October 8th, 2001, 10:25 AM
etherwolf's Avatar
etherwolf etherwolf is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Aspen area
Posts: 89 etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level)etherwolf User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 2 h 34 m 52 sec
Reputation Power: 8
Send a message via ICQ to etherwolf
The directory I'm protecting is the same as the absolute path in the <Directory /usr/local/www/net/htdocs> tag.

To recap, my httpd.conf entry for my intranet now reads like so:

<Directory "/usr/local/www/net/htdocs">
Options Indexes
AllowOverride None
Auth_SMB_Server NTSERVER #can't use 192.168.1.2 unfortunately
Auth_SMB_Domain NTDOMAIN
AuthType Basic
AuthName "intranet"
Require valid-user
</Directory>

The bloody thing is still asking me to login for each of the 14 images on my main page (I had forgotten the swapping images) which I can't really ask my fellow employees to do... :-P

Any other ideas?

Many thanks again!

# Nathan

Reply With Quote
  #7  
Old October 8th, 2001, 10:35 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
As I said, I have never tried mod_auth_smb. I suggest you to start from basics and use -> http://httpd.apache.org/docs/mod/mod_auth.html just to see if it works.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > page requires login when I refresh or change pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway