LinuxQuestions.org
Help answer threads with 0 replies.
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 01-28-2011, 01:35 PM   #1
fedoraibg
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
autofs5 ldap - searching multiple DN's


Hello,

I would like to know if there is a way in autofs5 to search for a key in multiple OU's?

I am migrating our existing NIS infrastructure to LDAP. Over the years the NIS environment has evolved (not necessarily for the better). I have a back end database and each NIS master extracts specific elements from the DB to create the NIS maps.

On my Linux servers I use a program map that prgramatically searches multiple NIS maps. On Solaris I have an auto.home file that will search auto_home and auto_service ( Home has all home directories associated with people ( ie in the passwd file ) auto_service contain directories that are accessed as /home/.... but are not tied to a user account.

I also have regional data and unfortunately, my back end storage is not consistant so /apps/perl in one region will resolve to regionA:/path1/path2/perl and in another region it may resolve to regionB:/path33/path2/perl.

Can this be done?

Thanks in advance.
 
Old 01-28-2011, 01:54 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You've said about what you're doing on NIS, but very little about autofs and ldap at all... I'm sure what you want can be done. For one thing you can use openldap to create an ldap proxy and graft arbitrary OU's from multiple servers into a single ldap interface, which could be personally across your environment. There may be better ways to do what you want, but that's my first thought in order to do it cleanly and as generically as possible.
 
Old 01-28-2011, 03:17 PM   #3
fedoraibg
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you Acid...

We are using Active Directory and I have very very little flexibility over this. I cannot do anything with openLdap. I am using the standard autofs schema with autofs5 ( automountKey, automountMapName, automountInformation).

I want to configure autofs ( using LDAP ) to look at multiple OU's. If a key is not found in one OU, It should search the next OU.
So, in a non-LDAP auto_home file I can have an auto_home followed by auto_service. /home/foobar will try auto_home and if not found search auto_service. I want to do the same using ldap, but cannot figure out how.

This is a simplistic example of what I want. I realize, I can combine the 2 NIS maps into one LDAP container, but for various reasons, I cannot do that right now.

I only picked up LDAP within this past month, so admittedly, I have very limited knowledge. I know I can do some of what I need using openldap and referrels, but that too is impossible right now. I am stuck with AD.

Does this better clarify what my goal is?

my ldif is:
dn: OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
objectClass: top
objectClass: organizationalUnit
ou: automounts
description: Holds Automount Information
distinguishedName: OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
instanceType: 4
name: automounts

dn: automountMapName=auto.master,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
objectClass: top
objectClass: automountMap
distinguishedName: automountMapName=auto.master,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
instanceType: 4
name: auto.master
automountMapName: auto.master

dn: automountKey=/home,automountMapName=auto.master,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
objectClass: top
objectClass: automount
distinguishedName: automountKey=/home,automountMapName=auto.master,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
instanceType: 4
name: /home
automountInformation: auto_home
automountKey: /home

dn: automountMapName=auto_home,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
objectClass: top
objectClass: automountMap
distinguishedName: automountMapName=auto_home,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=mydomain,DC=com
instanceType: 4
name: auto_home
objectCategory: CN=automountMap,CN=Schema,CN=Configuration,DC=mydomain,DC=com
automountMapName: auto_home

dn: automountKey=foobar,automountMapName=auto_home,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=myd omain,DC=com
objectClass: top
objectClass: automount
distinguishedName: automountKey=foobar,automountMapName=auto_home,OU=automounts,OU=class,OU=eng,OU=Applications,,DC=myd omain,DC=com
instanceType: 4
name: ranap
automountInformation: -rw,hard,nosuid,noquota,intr,noacl region1:/vol/vol1/users/foobar
automountKey: foobar
 
Old 01-29-2011, 04:55 AM   #4
jwilleke
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Rep: Reputation: 0
From a LDAP standpoint, you could use "Extensible Match" which will work for this.

Check out "Extensible Match"

However, not sure if AD supports "Extensible Match"
 
Old 01-29-2011, 04:59 AM   #5
jwilleke
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Rep: Reputation: 0
Guess not.
http://msdn.microsoft.com/en-us/libr...=prot.10).aspx

Last edited by jwilleke; 01-29-2011 at 05:11 AM.
 
  


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
Searching multiple words? ritika_sharma Linux - Newbie 7 12-17-2010 02:25 AM
pam_ssh searching private key on a LDAP server caveden Linux - Security 2 10-06-2009 08:16 PM
LDAP API - Searching through multiple OU smurff Programming 3 09-22-2006 03:22 AM
searching for multiple files ryedunn Linux - Newbie 4 09-27-2004 03:21 PM
searching for LDAP address-book-client Clemente Linux - Software 0 04-25-2004 12:02 PM

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

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