YOUR_ORG_ID<\/em>,dc=jumpcloud,dc=com” -W “(objectClass=inetOrgPerson)”<\/code><\/p>\n\n\n\nTo find a user in LDAP:<\/strong><\/p>\n\n\n\nBy distinguished name (DN):(uid=john,ou=Users,o=<your-organization-id>,dc=jumpcloud,dc=com)
By full name (cn):(cn=John Doe)
By last name (sn):(sn=Doe)
By given name (givenName):(givenName=John)
By username (uid):(uid=john)
By UID number (uidNumber):(uid=1000)<\/code><\/p>\n\n\n\nFinding Users in a Specific Group<\/h2>\n\n\n\n<\/p><\/div>
Note:<\/strong> An LDAP user must be bound to an LDAP group in order for the LDAP group to appear in an ldapsearch.<\/p><\/div><\/div><\/div>\n\n\n\nWhen a group of users is bound to LDAP, a groupOfNames<\/strong> object is created in LDAP. In the case of 黑料海角91入口’s hosted LDAP service, this consists of one or more member attributes, and those attributes are the distinguished names of the users in the group. <\/p>\n\n\n\nTo find users in a specific group:<\/strong><\/p>\n\n\n\n\n- To find users in a group, search for the groupOfNames<\/strong> object that was created in LDAP.<\/li>\n<\/ol>\n\n\n\n
For example:<\/p>\n\n\n\n
When you’re searching for a groupOfNames<\/strong> object called Admins<\/strong>, run the following query.<\/p>\n\n\n\nAdmins, Users, <org-id><\/code> , jumpcloud.com<\/code><\/p>\n\n\n\ndn: cn=Admins,ou=Users,o=<org-id>,dc=jumpcloud,dc=com
member: uid=john,ou=Users,o=<org-id><\/code>,dc=jumpcloud,dc=com
member: uid=mary,ou=Users,o=<org-id><\/code>,dc=jumpcloud,dc=com
objectClass: top
objectClass: groupOfNames
description: tagGroup
cn: Admins
ou: Admins<\/code>
In this case, “john” and “mary” are both in the the “Admins” group.
<\/p>\n\n\n\nGetting the Attributes of a Specific Group<\/h2>\n\n\n\n
(&(objectClass=groupOfNames)(cn=Admins))<\/code><\/p>\n\n\n\nThe query above says, \u201cshow me only LDAP records where objectClass=groupOfNames<\/strong> (a group), and where the group name (cn) equals Admins<\/strong>“
<\/p>\n\n\n\nGetting the Users in a Specific Group<\/h2>\n\n\n\n
(&(objectClass=inetOrgPerson)(memberOf=cn=Admins,ou=Users,o=,dc=jumpcloud,dc=com))<\/code><\/p>\n\n\n\nThe query above says, \u201cgive me only users (objectClass=inetOrgPerson) where the users are members of the Admins<\/strong> group\u201d.<\/p>\n\n\n\n<\/p><\/div>
Note:<\/strong> In the above queries, the queries are surrounded by (&(filter1)(filter2)). This is called “prefix” notation, and is exactly the same as the “infix” notation that you may be more used to, which would look like: (filter1) and (filter2).<\/p><\/div><\/div><\/div>\n\n\n\n