LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 12-07-2015, 11:34 AM   #1
micromacromonkey
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Rep: Reputation: Disabled
AD LDAP - can't search on memberOf


Hi all

I am trying to use SSSD on RHEL 6.4 to authenticate users from Active Directory. It works if I don't specific an access filter, but if I try to filter based on group membership (memberOf) it fails.

Quote:
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_account_expired_ad] (0x0400): Performing AD access check for user [d-test2]
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_account_expired_ad] (0x4000): User account control for user [d-test2] is [0].
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_account_expired_ad] (0x4000): Expiration time for user [d-test2] is [0].
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_access_filter_send] (0x0400): Performing access filter check for user [d-test2]
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_access_filter_send] (0x0400): Checking filter against LDAP
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_id_op_connect_step] (0x4000): reusing cached connection
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_print_server] (0x2000): Searching 10.21.1.92
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_get_generic_ext_step] (0x0400): calling ldap_search_ext with [(&(sAMAccountName=d-test2)(objectclass=user)(memberOf=CN=LOC-RHEL-Admins,OU=Security Groups,OU=Dev,DC=mycompany,DC=com))][CN=d-test2,OU=Users,OU=Dev,DC=mycompany,DC=com].
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_get_generic_ext_step] (0x2000): ldap_search_ext called, msgid = 19
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_process_result] (0x2000): Trace: sh[0xda8600], connected[1], ops[0xdb52e0], ldap[0xda8670]
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_process_message] (0x4000): Message type: [LDAP_RES_SEARCH_RESULT]
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_get_generic_op_finished] (0x0400): Search result: Success(0), no errmsg set
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_id_op_done] (0x4000): releasing operation connection
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_access_filter_done] (0x0100): User [d-test2] was not found with the specified filter. Denying access.
(Mon Dec 7 15:51:49 2015) [sssd[be[mycompany.com]]] [sdap_access_filter_done] (0x0400): Access denied by online lookup
Interestingly the query returns values (the users who are members) from ldp.exe (MSFT tool) on windows but returns zero from ldapsearch on the RHEL box.

So this fails:

ldapsearch -H ldap://server1.mycompany.com/ -Y GSSAPI -b "ou=users,ou=dev,dc=mycompany,dc=com" "(&(sAMAccountName=d-test2)(objectclass=user)(memberOf=CN=LOC-RHEL-Admins,OU=Security Groups,OU=Dev,DC=mycompany,DC=com))"

(NB GSSAPI and other params are all fine, if I take out the memberOf clause it returns results, so it's just the memberOf bit that is failing).

The very same query returns the members when run from ldp.exe on windows.

Anyone have any ideas?
 
Old 12-09-2015, 02:36 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Can you provide the output from removing the 'memberOf' part?
 
Old 12-11-2015, 03:38 AM   #3
micromacromonkey
LQ Newbie
 
Registered: Dec 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
hi, thanks for the reply. I managed to track this down:

The ldapsearch/SSSD queries were running as the host principal, so the read privileges that principal had were due to membership of the special group Authenticated Users. Authenticated Users does not by default have a Read privilege on the memberOf attribute of a user object. When I ran as a different user that had this right (coincidentally on Windows) it read it OK. This is 'by design' in active directory, to prevent enumeration of group memberships unless the privilege is specifically granted. I have now created a group for all the RHEL principals which is assigned this privilege.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LDAP cannot enable attribute memberOf xuta Linux - Server 13 03-13-2012 10:59 AM
Regarding LDAP Search Filter prasanthhs Linux - Software 8 12-16-2011 04:08 AM
[SOLVED] How to specify space in ou name in ldap search steven.c.banks Linux - General 2 09-29-2010 09:47 AM
[SOLVED] LDAP search frozenQueue Linux - Server 2 09-15-2010 05:46 PM
samba4: LDAP memberOf: attribute type undefined touzeaud Linux - Server 10 04-13-2009 07:03 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 09:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration