LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-24-2010, 06:50 AM   #1
harshaabba
Member
 
Registered: Aug 2009
Posts: 73

Rep: Reputation: -14
Secure CGI file in Apache


Hi

Im using opennms network configuration backup server called 'RANCID'.It run on top of RHEL5 system and
using APache.

Here's the link which i'm accessing

http://172.25.6.211/cgi-bin/cvsweb.cgi

But any one can access this URL and obtain my configuration files

I want to secure this using a logon page.allow login Only for the successful authentications by entering the predefined
username and password

But after get authenticate book marking the above URL still can access anyone since it didnt prompt username and password again

In eachtime executing the above url it should direct to authenticate page

Please be kind enough to give a way to implement this ?

tnx
 
Old 09-24-2010, 07:20 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,072

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
Hi,

Why don't you use apache authentication, to prompt clients for username/password? It does exactrly what you want to achieve.

Regards
 
Old 10-05-2010, 01:08 AM   #3
harshaabba
Member
 
Registered: Aug 2009
Posts: 73

Original Poster
Rep: Reputation: -14
Secure CGI file in Apache

hi

I did what you mentioned.But still I have problems.
I access the web page using Morzilla Browser.Once Im log to the page entering the correct user name and password with the same Browser in different tab dont prompt for username/password I can access the page without username/password.

When I used IE browser things are different.Initially it'll prompt for username/password.After I entered correct credentials I can access the page without prompting username/password even using a new tab with same browser or new IE browser.

How can i overcome these.your responses are highly

tnx
 
Old 10-05-2010, 04:04 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,072

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
Hi,

I cannot see any difference in the behavior of both browsers as you described it.
In fact this is the normal behavior. Once you've authenticated with username/password, the browser keeps those credentials for the duration of the current session. You can take look here for details
If you close and restart the browser the credentials are lost and you'll be prompted again to supply them on order to access the protected resource.
 
Old 10-05-2010, 04:53 AM   #5
harshaabba
Member
 
Registered: Aug 2009
Posts: 73

Original Poster
Rep: Reputation: -14
Secure CGI file in Apache

hi

tnx a lot for your reply.But I see the mentioned difference in both browsers.IE is less secure and even after starting a new IE don't prompt for username/password.These are the configuration I used.

vi /var/www/html/.htaccess

AuthUserFile /home/secure/apasswords
AuthType Basic
AuthName "Restricted Area"
<Limit GET POST>
Require valid-user
</Limit>

vi /etc/httpd/conf/httpd.conf

<Directory "/var/www/html>
Options Indexes Includes FollowSymLinks MultiViews
Allowoverride AuthConfig

Is there any mistakes which I have done or Is there any other alternate way ?

tnx
 
Old 10-05-2010, 06:54 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,072

Rep: Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969Reputation: 1969
No. your web server configuration is OK.

You have to close all browser sessions that are currently running in order to clear the credentials.
If E still remembers passwords you can take a look here or here to see how to stop it from doing so.

Regards
 
  


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
CGI File Not Executing on Apache Server kaplan71 Linux - Software 2 10-21-2004 07:12 AM
Apache: png file in CGI directory doza Linux - Software 2 08-27-2004 08:05 AM
Probs running .jar file via CGI script under Apache blimbo Programming 1 07-22-2004 10:29 AM
apache displays .cgi file instead of executing it hewsonism Linux - Software 2 01-13-2004 09:12 PM
apache v2.0.44 + cgi ; securing cgi-support in apache markus1982 Linux - General 0 01-20-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:34 PM.

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
Open Source Consulting | Domain Registration