Hey Omi, Not knowing exact what you expect from your search but: If you use a filter like "objectclass=dcObject" your result include only all these objects and it´s parents ( so far as i know ). Your solution seemed to me efficient but do you realy want to get ALL information after " dc=A, dc=B, dc=C" ? My experiences are, that a exact match using filter like AND/OR/NOT and so on is at least more efficent than fetching first ALL information and sort out later the needet data. Also do not forget to think about the query load on the LDAP server to retrieve a large number of data and transfer that to your client(s).
Regards Karsten Am Dienstag, 6. Januar 2009 08:36 schrieb omi: > On Jan 5, 10:56 pm, oakulka...@gmail.com (Omkar) wrote: > > hi all, > > I am trying to write one tool, that could find the all available dc > > values. > > see example: > > -> base dn: dc=A, dc=B, dc=C > > ou =users, dc=A, dc=B, dc=C > > ou= groups,dc=A, dc=B, dc=C > > dc=D, dc=A, dc=B, dc=C > > ou=users, dc=D, dc=A, dc=B, dc=C > > something like structure I have in LDAP DIR, > > now I just want to find out all avalable dc's by accepting base dn as > > input in PERL:LDAP. > > How I can do that? any tutorial / script? > > > > Thanks, > > Omi > > Got One of the Answer as following : > > my($mesg) = $ldap->search( base => "dc=A,dc=B,dc=C", > filter => > '(objectclass=dcObject)'); > I hope that works correctly. Please let me know if there is any other > solutions available. > > Thanks, > Omi. > > > This mail has originated outside your organization, either from an external > partner or the Global Internet. Keep this in mind if you answer this > message. -- //// Never forget your towel \\\\ *********************************************************** Karsten Kankowski on behalf of Computacenter Subcontractor for OADI Phone: +49 (0)40 743 74589 Fax: +49 (0)40 743 870 74589 Mailto:karsten.kankow...@airbus.com PgP-Key 0x754EEF1D Nick:SLbrxCjzO5yRU ********************************************************** The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other then the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.