[ILUG] LDAP on Linux
Ruairi Hickey
ruairi.hickey at collon.ie
Thu Oct 16 10:57:41 IST 2008
Install ldap-utils, configure your AD to allow anonymous queries (if you
want to automate the script) and use something similar to the following:
ldapsearch -x -h XXXXXX.local -b "OU=Staff,dc=ie,dc=XXXXXX,dc=XXXXX"
'(!(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=3)))'
mail proxyAddresses | grep -i -e ^mail: -e '^proxyAddresses: smtp:' | sed
-e 's/mail: //i' -e 's/proxyAddresses: SMTP://i' | awk '{ print
tolower($1); }; ' | sort -n | grep -v .local | uniq
which gives a list of valid email accounts....
Ruairi
On Thu, 16 Oct 2008 10:47:23 +0100, Brian O'Mahony
<brian.omahony at curamsoftware.com> wrote:
> I haven't done very much with LDAP on linux, so wanted to ask about
running
> LDAP queries on a linux box against an Active Directory Services
(win2003).
>
> Basically, what I want to do is check everybody in the passwd file, take
> the user account, run an LDAP query against the ADS server, and return
just
> the name and the primaryGroupID value.
>
> Any easy way of doing this from linux?
>
> B
>
>
> The information in this email is confidential and may be legally
> privileged.
> It is intended solely for the addressee. Access to this email by anyone
> else
> is unauthorized. If you are not the intended recipient, any disclosure,
> copying, distribution or any action taken or omitted to be taken in
> reliance
> on it, is prohibited and may be unlawful. If you are not the intended
> addressee please contact the sender and dispose of this e-mail. Thank
you.
>
>
More information about the ILUG
mailing list