Article 4YVC4 How to find user is part of how many group in OpenLDAP with ldapsearch query

How to find user is part of how many group in OpenLDAP with ldapsearch query

by
mamillaSumanth
from LinuxQuestions.org on (#4YVC4)
Hello,

I want to get the name of groups to which users belongs in OpenLDAP.

As of now i could only find user details and group details individually.

[eedbuser@xxxx]$ ldapsearch -LLL -h xxxxxx -D uid=sai,ou=People,ou=xxxx,o=EEDIR -x -W -b o=EEDIR uid=sai
Enter LDAP Password:
dn: uid=sai,ou=People,ou=XXXXX,o=EEDIR
loginShell: /bin/bash
gidNumber: 55555
uid: sai
sn: sai
status: ACTIVE

If i want to find any group details i will use cn: GROUP NAME

But whati want here is when i search for user details at the same time i should get user info and user is part which groups also.latest?d=yIl2AUoC8zA latest?i=ht7WR293W6c:CohEq4G87VA:F7zBnMy latest?i=ht7WR293W6c:CohEq4G87VA:V_sGLiP latest?d=qj6IDK7rITs latest?i=ht7WR293W6c:CohEq4G87VA:gIN9vFwht7WR293W6c
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments