LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 02-04-2004, 07:16 AM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
Authentication, Authorization and Access Control


Authentication, Authorization and Access Control

I've never been able to get this going so my question is, is this the right way to do it for Fedora Core 1 system.

I cant seem to find the path it talks about,

http://httpd.apache.org/docs-2.0/howto/auth.html

on the subject ( Getting it working )

it goes on about htpasswd -c /usr/local/apache/passwd/passwords rbowen .

is this correct ?

AuthType Basic
AuthName "Restricted Files"
AuthUserFile /usr/local/apache/passwd/passwords
Require user rbowen

when i search for apache/passwd/passwords i cant find it

all i have is

[root@www root]# find / -name apache
/var/cache/alchemist/apache
/etc/webmin/apache
/usr/libexec/webmin/apache
/usr/libexec/webmin/caldera/apache
/usr/libexec/webmin/mscstyle3/apache
[root@www root]# find / -name htpasswd
/usr/bin/htpasswd


I am real lost on this one..

TT



 
Old 02-04-2004, 08:10 AM   #2
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Just an update i have followed that page to a T

and i dont get the password box pop up.

[root@www root]# htpasswd -c /var/www/pass/passwords my_user
New password:
Re-type new password:
Adding password for user my_user


here is what i put under my folder i wish to protect .htaccess
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /var/www/pass/passwords
Require user my_user

Am i missing some thing here ?

TT
 
Old 02-04-2004, 04:22 PM   #3
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
Quote:
here is what i put under my folder i wish to protect .htaccess

AuthType Basic
AuthName "Restricted Files"
AuthUserFile /var/www/pass/passwords
Require user my_user
That part looks ok to me.


Starting from the beginning...

1. are you sure that mod_auth is installed? Check httpd.conf

2. Have you allowed file overrides via a container directive for the folder you wish to protect? By default, apache has pretty restrictive settings here. You need to explicitly allow file overrides in httpd.conf


Skye
 
Old 02-04-2004, 07:01 PM   #4
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Ok i checked the httpd.conf file

is this what you where talking about

LoadModule auth_module modules/mod_auth.so

As to the 2nd one you were talking about i'm alittle lost

TT

 
Old 02-04-2004, 07:08 PM   #5
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
OK that's a yes for #1

Read up on mod_auth. You have to use a container directive e.g

<DIRECTORY (your.protected.dir.name)>
AllowOverride AuthConfig
</DIRECTORY>


http://httpd.apache.org/docs-2.0/howto/auth.html - look under 'pre-requisites'
 
Old 02-04-2004, 07:11 PM   #6
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
So this container directive

has to go into the httpd.conf as well ?

TT
 
Old 02-04-2004, 07:19 PM   #7
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Thank you,

I just added it to the bottom of the httpd.conf file

and it worked.

thank you, i'll write my self and short doc on it now


TT
 
Old 02-04-2004, 11:23 PM   #8
cyberskye
Member
 
Registered: Feb 2003
Location: The City by the Bay
Posts: 116

Rep: Reputation: 15
cheers. In your httpd.conf there is a

<DIRECTORY />
AllowOverrides None
</DIRECTORY>

block which tells apache to ignore .htaccess files for the whole document root. specific rules beat generic ones, so by calling your specific directory out in it's own container, you override the override. You could do the same with a FILE container if you don't need to protect the whole folder..


Last edited by cyberskye; 02-04-2004 at 11:29 PM.
 
  


Reply



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
access control in IPcop BillyB Linux - Networking 0 02-26-2005 09:06 AM
Proftpd, Anonymous Access, Directory Authentication bskouby Linux - Newbie 0 03-23-2004 03:08 PM
[access] continuous authorization required wuck LQ Suggestions & Feedback 2 09-26-2003 04:38 AM
Config problem: "Authorization failed: server rejected access" -- help please! womble_timsk Linux - Networking 0 05-22-2003 04:09 AM
questions about authentication and control+c in console applications punt Linux - General 1 11-29-2001 11:58 PM

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

All times are GMT -5. The time now is 01:15 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
Open Source Consulting | Domain Registration