LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-18-2014, 09:14 AM   #1
mosiac
Member
 
Registered: Jan 2013
Distribution: RHEL
Posts: 54
Blog Entries: 1

Rep: Reputation: 4
Need to set LDAP Auth in Apache to only allow users in a specific group


Summary of the issue is I'm setting up and configuring a new nagios server and a request I had was to get user accounts authenticating through active directory, which isn't a big deal I found a simple guide and I got it to work.

Problem is anyone on our domain is able to login, they can't see anything unless I've set them to, but I'd rather they not login.

Here's the snippit from my httpd.conf file

Code:
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    AuthBasicProvider ldap
    AuthType Basic
    AuthzLDAPAuthoritative on
    AuthName "Active Directory Login"
    AuthLDAPURL "ldap://dcipaddress:3268/dc=domain,dc=com?sAMAccountName?sub"
    AuthLDAPBindDN "user@domain.com"
    AuthLDAPBindPassword "password"
    Require ldap-group cn=naggy_group
</Directory>
I feel like I"m just missing something really simple.

Thanks in advance
 
Old 09-18-2014, 11:36 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Require ldap-group cn=naggy_group
I guess you have to specify the full dn of the group in question.
Something like
Code:
Require ldap-group cn=naggy_group, dc=domain,dc=com
 
Old 09-18-2014, 11:44 AM   #3
mosiac
Member
 
Registered: Jan 2013
Distribution: RHEL
Posts: 54

Original Poster
Blog Entries: 1

Rep: Reputation: 4
Quote:
Originally Posted by bathory View Post
I guess you have to specify the full dn of the group in question.
Something like
Code:
Require ldap-group cn=naggy_group, dc=domain,dc=com
Tried this and it still didn't work.

It seems like no matter what i put in the Require fields, it doesn't care it just authenticates any user that can log in correctly.
 
Old 09-18-2014, 12:43 PM   #4
mosiac
Member
 
Registered: Jan 2013
Distribution: RHEL
Posts: 54

Original Poster
Blog Entries: 1

Rep: Reputation: 4
I did find out what the problem was. Httpd.conf was handling the AD portion and then nagios.conf was verifying users I didn't realize it would work that way but once I tried it
(moved all the Require fields over to nagios.conf) it worked fine
 
  


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
[SOLVED] Kerberos auth with ldap to active directory -advenced group options grzeslaw Linux - Server 8 10-16-2012 02:39 AM
[SOLVED] Apache authentication: allow LDAP group OR user named guest, but not all LDAP users AlucardZero Linux - Server 1 05-25-2011 03:21 PM
Apache LDAP auth with local users - getting warnings - possible to suppress? laggerific Linux - Software 1 08-18-2009 06:32 PM
ldap as auth server, users sometimes unknown ?? rhoekstra Fedora 2 09-05-2005 01:39 AM
How to make a specific command(s) work for specific users or group only naren_0101bits Linux - General 3 08-28-2005 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:52 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