Get an object by its objectGUID using ldapsearch
Posted
by orsogufo
on Server Fault
See other posts from Server Fault
or by orsogufo
Published on 2010-05-11T15:02:09Z
Indexed on
2010/05/11
15:04 UTC
Read the original article
Hit count: 332
If I have the objectGUID attribute as returned by the ldapsearch
command, how can I search the whole directory for an object with that objectGUID?
For example, if I search a user getting its objectGUID, I get the following:
ldapsearch -x -D $MyDn -W -h $Host -b "dc=x,dc=y" "(mail=something)" objectGUID
# 7f435ae312a0d8197605, p, Externals, x.y
dn: CN=7f435ae312a0d8197605,OU=p,DC=x,DC=y
objectGUID:: b+bSezFkKkWDmbIZiyE5rg==
Starting from the value b+bSezFkKkWDmbIZiyE5rg==
, how can I create a query string to get that object?
© Server Fault or respective owner