Sponsored Content
Full Discussion: LDAP Group query
Special Forums UNIX and Linux Applications LDAP Group query Post 302949319 by jhamaks on Thursday 9th of July 2015 09:00:21 AM
Old 07-09-2015
LDAP Group query

I need to write LDAP group query where I need to find if a particular user is a member of a 2 specific Groups. This is LDAP Novell edirectory implementation.

Below are the details -
================

LDIF entry for OndotAPI group
dn: cn=OndotAPI,ou=Groups,o=CNS
changetype: add
objectClass: top
objectClass: groupOfNames
objectClass: CCGroupApplication
cn: OndotAPI

# OndotAPI, Groups, CNS
dn: cn=OndotAPI,ou=Groups,o=CNS
member: cn=OndotUsr,ou=WebServices,o=fiserveft
member: uid=test1113,ou=People,o=CNS
member: uid=rtest901,ou=People,o=CNS
member: cn=OndotUsr2,ou=WebServices,o=fiserveft

AND

LDIF entry for CREATE_SESSION role. Notice the user OndotUsr is also a member of that role.
dn: cn=CREATE_SESSION,ou=Groups,o=CNS
changetype: add
objectClass: top
objectClass: groupOfNames
objectClass: CCGroupRole
cn: CREATE_SESSION

# CREATE_SESSION, Groups, CNS
dn: cn=CREATE_SESSION,ou=Groups,o=CNS
member: cn=OndotUsr,ou=WebServices,o=fiserveft
member: uid=test1113,ou=People,o=CNS
member: uid=rtest901,ou=People,o=CNS
member: cn=OndotUsr2,ou=WebServices,o=fiserveft

So I need to verify using LDAP query that OndotUsr is a member of both the group - OndotAPI and CREATE_SESSION.

If this sounds difficult, then i need to write two queries one after the another in my program.
1) 1st query to see if OndotUsr is member of OndotAPI
2) if Yes, then only it'll run second query.
2n query to find if the OndotUsr is member of CREATE_SESSION group.

Need your help in writing this query.

Thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl and Net::LDAP, objects and arrays query

Hi I'm not a programmer but am muddling through as best I can. I am trying to set up a PostSearchHook for Radiator (RADIUS server), that carries out an LDAP lookup, and, based on the string returned ("staff" or "student") in the "businessCategory" attribute, will set the $role to be either 40... (3 Replies)
Discussion started by: mikie
3 Replies

2. UNIX for Dummies Questions & Answers

LDAP search query help

I would like to do an ldap search which looks for entries which do not actually have a certain attribute. Not that the attribute is Null, but where the attribute does not exist. Is this possible using ldapsearch? (3 Replies)
Discussion started by: dopple
3 Replies

3. Red Hat

Issues with LDAP user/group permissions on NFS share

I can't seem to make sense of this. $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) $ $ mount /dev/sda2 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda1 on... (6 Replies)
Discussion started by: dfinn
6 Replies

4. Emergency UNIX and Linux Support

Configure Squid to use LDAP group auth to deny internet access

Hi all We have squid-2.5.STABLE11-3.FC4 running in our environment. LDAP authentication works fine. Active Directory 2003 Users are prompted to enter credentials every time they access the net. The system works perfectly, but I need to configure Squid to block users in a specific AD group.... (1 Reply)
Discussion started by: wbdevilliers
1 Replies

5. Shell Programming and Scripting

Ldap search query

Hi All, I have a existing Ldap query which take a HOME as variable and gives the result where i grep for a particular line. ldapsearch -h server_domain_name -p 389 -D "uid=user,ou=appadm,o=ent" -w PaB -b "ou=roles,o=ent" "cidx=$HOME" | grep -w "ent: xyz" Now i have 330K Homes in a... (1 Reply)
Discussion started by: posner
1 Replies

6. Solaris

Solaris LDAP group problem

I have a test environment which is running RedHat 6.5 Identity management. On the lab network are two Solaris 10 (U11) machines. I can successfully log into the S10 machines using the ldap username/passwords. However, I have a problem with groups and although I found through an internet search one... (3 Replies)
Discussion started by: cjhilinski
3 Replies

7. Emergency UNIX and Linux Support

LDAP and AD Authentication Query

Hi Friends, I have below scenarios . dom1.test.com - LDAP dom2.test.com - AD Requirement is establish a trust relation between LDAP and AD server in such a way that if any user login on LDAP managed authentication server with dom1\username -> get authenticated by LDAP host ... (2 Replies)
Discussion started by: Shirishlnx
2 Replies

8. Web Development

Getting apache to see a LDAP group membership change

trying to implement authz to a webpage using require ldap-group. It works, except I need to do apachectl restart before the server will observe an add or a delete to the group. Seems like apache is acquiring the group membership at startup & caching it. It's a static group. I have apache... (0 Replies)
Discussion started by: maraixadm
0 Replies

9. UNIX for Advanced & Expert Users

AD Group Policy Management and Kerberos / LDAP

Has anyone attempted to define GPO / HBAC policies in Windows Server 2012 that could be respected by Kerberos/LDAP on AIX? I'm looking to associate servers to groups so that when a user part of a group tries to login to a host not associated with that group, it would be denied. This would allow... (3 Replies)
Discussion started by: Devyn
3 Replies

10. UNIX for Advanced & Expert Users

LDAP Query - host allowed option

I have an in interesting dilemna that I am trying to address. I have some ldap queries that I use to retrieve user information to perform access validations on a quarterly/annual basis. I can successfully pull the local users, and I can use ldapsearch to pull back all the users from the DN as well.... (7 Replies)
Discussion started by: dagamier
7 Replies
eucTW(5)							File Formats Manual							  eucTW(5)

NAME
eucTW - A character encoding system (codeset) for Traditional Chinese DESCRIPTION
The Taiwanese EUC (Extended UNIX Code), or eucTW, codeset consists of the following character sets: ASCII CNS 11643 (Plane 1 to Plane 16) Taiwanese EUC uses a combination of single-byte data and 2-byte data to represent ASCII characters, symbols, and ideographic characters. Because too many character planes were included, Taiwanese EUC uses different leading codes to designate different character planes. ASCII characters are represented in the form of single byte 7-bit data in Taiwanese EUC; that is, the most significant bit (MSB) of the byte that represents an ASCII character is always set off. For more information, refer to ascii(5). Although the standard Taiwanese EUC codeset includes all characters defined by the CNS 11643-1992 standard, the operating system's eucTW implementation currently supports the following: Characters defined in the first and second planes of CNS 11643 The EDPC Recommended Char- acter Set (refer to dechanyu(5) for more information) CNS 11643-1986 and DTSCS characters that have been remapped into the third and fourth character planes by the CNS 11643-1992 standard Characters that were added to CNS 11643-1986 by the CNS 11643-1992 standard are not supported. The characters that are defined in plane 1 and plane 2 of CNS 11643-1992 and that are the same as those defined in CNS 11643-1986 are as follows: --------------------------------------------------------------------- Character Plane Character Type Number of Characters --------------------------------------------------------------------- 1 Special characters 651 Control characters 33 Frequently-used characters 5401 2 Less frequently-used char- 7650 acters --------------------------------------------------------------------- The characters defined in plane 3 and plane 4 of CNS 11643-1992 are as follows: --------------------------------------------------------------------------- Character Plane Character Type Number of Characters --------------------------------------------------------------------------- 3 Rarely-used characters (EDPC Part I) 6148 4 Used for residency system, ISO 2nd edi- 7298 tion DIS 10646 Han characters, 171 EDPC Part II Characters --------------------------------------------------------------------------- The characters that have been remapped into the third and fourth character planes of CNS 11643-1992 as specified by the EDPC are as fol- lows: --------------------------------------------------------- EDPC Characters Character Plane Number of Characters --------------------------------------------------------- Part I Plane 3 6148 Part II Plane 4 171 --------------------------------------------------------- Taiwanese EUC Encoding Except for characters in the first plane of CNS 11643-1986, Taiwanese EUC makes use of a leading code (the 8-bit Single-Shift 2 control character (SS2) and an additional byte) to designate characters to a character plane. The position of a character on a plane is specified by two bytes. The first byte determines the character's row number and the second byte determines the character's column number. The MSB of both bytes is set on. The following table shows the encoding of Taiwanese EUC characters: ------------------------------------------------------- CNS 11643-1986 Code Plane Leading Code Code Range ------------------------------------------------------- 1 [nil] A1A1 - FEFE 2 SS2 A2 A1A1 - FEFE 3 SS2 A3 A1A1 - FEFE 4 SS2 A4 A1A1 - FEFE 5 SS2 A5 A1A1 - FEFE 6 SS2 A6 A1A1 - FEFE 7 SS2 A7 A1A1 - FEFE 8 SS2 A8 A1A1 - FEFE 9 SS2 A9 A1A1 - FEFE 10 SS2 AA A1A1 - FEFE 11 SS2 AB A1A1 - FEFE 12 SS2 AC A1A1 - FEFE 13 SS2 AD A1A1 - FEFE 14 SS2 AE A1A1 - FEFE 15 SS2 AF A1A1 - FEFE 16 SS2 B0 A1A1 - FEFE ------------------------------------------------------- Codeset Conversion The following codeset converter pairs are available for converting Traditional Chinese characters between eucTW and other encoding formats. Refer to iconv_intro(5) for an introduction to codeset conversion. For more information about the other codeset for which eucTW is the input or output, see the reference page specified in the list item. big5_eucTW, eucTW_big5 Converting from and to the Big-5 codeset: big5(5). Note that Big-5 encoding is equivalent to the Microsoft code-page format used on PCs for Traditional Chinese. You can therefore use this set of converters to convert Traditional Chinese text between the eucTW and PC code-page formats. For information about how the operating system supports PC code pages, see code_page(5). dechanyu_eucTW, eucTW_dechanyu Converting from and to the DEC Hanyu codeset: dechanyu(5). dechanzi_eucTW, eucTW_dechanzi Converting from and to the DEC Hanzi codeset: dechanzi(5). sbig5_eucTW, eucTW_sbig5 Converting from and to the Shift Big-5 codeset: sbig5(5). telecode_eucTW, eucTW_telecode Converting from and to the Telecode codeset: telecode(5). UCS-2_eucTW, eucTW_UCS-2 Converting from and to UCS-2 format: Unicode(5). UCS-4_eucTW, eucTW_UCS-4 Converting from and to UCS-4 format: Unicode(5). UTF-8_eucTW, eucTW_UTF-8 Converting from and to UTF--8 format: Unicode(5). Fonts for Taiwanese EUC For both display devices and printers, the operating system supports Taiwanese EUC through internal conversion to DEC Hanyu code and use of DEC Hanyu fonts (see dechanyu(5)). For general information on printing non-English text, refer to i18n_printing(5). SEE ALSO
Commands: locale(1) Others: ascii(5), big5(5), Chinese(5), code_page(5), dechanzi(5), GBK(5), iconv_intro(5), i18n_intro(5), i18n_printing(5), l10n_intro(5), sbig5(5), telecode(5), Unicode(5) eucTW(5)
All times are GMT -4. The time now is 12:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy