Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
querying Active Directory via LDAP in perl
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
joseph85...@yahoo.com  
View profile  
 More options Dec 11 2008, 1:47 pm
Newsgroups: comp.lang.perl.misc
From: joseph85...@yahoo.com
Date: Thu, 11 Dec 2008 10:47:17 -0800 (PST)
Local: Thurs, Dec 11 2008 1:47 pm
Subject: querying Active Directory via LDAP in perl
I've been poking at this on and off over the past few months, never
having much success.  I was never sure what sort of crazy query string
the AD server wanted.   But then it occurred to me that my Linux
Evolution email client does this without any problems-- only using the
IP address of the Active Directory LDAP server.  I can query/search,
and it immediately returns all matches.

How can it do this without the big ugly
"cn=users,dc=foo,dc=blah,o=acme......" string ?

Since this is obviously possible and simple (except for me), how could
I do this same simple query in perl-- only armed with the IP address
of my AD/LDAP server?

Curiously,
JS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thrill5  
View profile  
 More options Dec 11 2008, 9:11 pm
Newsgroups: comp.lang.perl.misc
From: "Thrill5" <nos...@somewhere.com>
Date: Thu, 11 Dec 2008 21:11:20 -0500
Local: Thurs, Dec 11 2008 9:11 pm
Subject: Re: querying Active Directory via LDAP in perl

<joseph85...@yahoo.com> wrote in message

news:03a34234-c330-464e-9a0c-6bd65c28b96b@k36g2000pri.googlegroups.com...

Google "LDAP query syntax",  and you will find a whole bunch of information
about querying AD via LDAP.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
joseph85...@yahoo.com  
View profile  
 More options Dec 12 2008, 11:26 am
Newsgroups: comp.lang.perl.misc
From: joseph85...@yahoo.com
Date: Fri, 12 Dec 2008 08:26:06 -0800 (PST)
Local: Fri, Dec 12 2008 11:26 am
Subject: Re: querying Active Directory via LDAP in perl
On Dec 11, 7:11 pm, "Thrill5" <nos...@somewhere.com> wrote:

Yes, google returns many articles mentioning query strings, such as:

search DN: ou=groups,ou=@company,dc=corp,dc=trx,dc=com

But back to my original question-- Evolution doesn't seem to need any
of this.  In Evolution, you simply give it the IP address of your AD/
LDAP server and it all magically works.  Evolution is running on a
linux box, which has no knowledge of the query string variables.

I even tried running a tcpdump on the connection to figure out what it
was doing but couldn't figure it out.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thrill5  
View profile  
 More options Dec 13 2008, 12:48 pm
Newsgroups: comp.lang.perl.misc
From: "Thrill5" <nos...@somewhere.com>
Date: Sat, 13 Dec 2008 12:48:17 -0500
Local: Sat, Dec 13 2008 12:48 pm
Subject: Re: querying Active Directory via LDAP in perl

<joseph85...@yahoo.com> wrote in message

news:e34ecf39-ee6c-42de-8056-d462661916f6@i24g2000prf.googlegroups.com...
On Dec 11, 7:11 pm, "Thrill5" <nos...@somewhere.com> wrote:

You obviously haven't read them, if you did you would know how to do this.
You need only to specify the CN to search for, the base DN (where to start
the search) along with setting the appropriate seach scope (i.e. subtree).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
joseph85...@yahoo.com  
View profile  
 More options Dec 14 2008, 1:52 pm
Newsgroups: comp.lang.perl.misc
From: joseph85...@yahoo.com
Date: Sun, 14 Dec 2008 10:52:36 -0800 (PST)
Local: Sun, Dec 14 2008 1:52 pm
Subject: Re: querying Active Directory via LDAP in perl
On Dec 13, 10:48 am, "Thrill5" <nos...@somewhere.com> wrote:

How does the Evolution mail client know how to query the AD Ldap
then?  I specified no CN, DN, or subtree; only the IP address of the
AD Ldap.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mart van de Wege  
View profile  
 More options Dec 14 2008, 5:16 pm
Newsgroups: comp.lang.perl.misc
From: Mart van de Wege <mvdwege_pub...@myrealbox.com>
Date: Sun, 14 Dec 2008 23:16:26 +0100
Local: Sun, Dec 14 2008 5:16 pm
Subject: Re: querying Active Directory via LDAP in perl

joseph85...@yahoo.com writes:
> On Dec 13, 10:48 am, "Thrill5" <nos...@somewhere.com> wrote:
>> <joseph85...@yahoo.com> wrote in message

>> news:e34ecf39-ee6c-42de-8056-d462661916f6@i24g2000prf.googlegroups.com...
>> On Dec 11, 7:11 pm, "Thrill5" <nos...@somewhere.com> wrote:

<snip>

Evolution does specify the CN:

mvdwege@gareth:/usr/lib/evolution$ find . -exec strings \{} \; | grep -i 'cn ='
cn = %s

Furthermore, I concur with the previous poster: *read* those search
entries. LDAP query syntax isn't that hard to understand, it's just
verbose.

Mart

--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rick Sanders  
View profile  
 More options Dec 12 2008, 12:58 pm
Newsgroups: comp.lang.perl.misc
From: Rick Sanders <rfs9...@earthlink.net>
Date: Fri, 12 Dec 2008 11:58:01 -0600
Local: Fri, Dec 12 2008 12:58 pm
Subject: Re: querying Active Directory via LDAP in perl

> In Evolution, you simply give it the IP address of your AD/
> LDAP server and it all magically works.  Evolution is running on a
> linux box, which has no knowledge of the query string variables.

LDAP is not magic.  Unless Evolution uses a base DN and a search filter
(and that means specifying Distinguished Names like base: ou=rickserver,
o=internet  filter: cn=rick) then it is not using LDAP to query Active
Directory.  It may be that Evolution is using canned queries such that
all you have to do is to supply the IP of the AD server and it builds
the LDAP search query.

If you have access to the logfiles on the Active Directory server you
should be able to see what Evolution is doing.

-Rick
** Posted from http://www.teranews.com **


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »