<HTML><HEAD>
<STYLE id=eMClientCss>
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
.plain pre, .plain tt { font-family: monospace; font-size: 100%; font-weight: normal; font-style: normal; }
a img { border: 0px; }body {font-family: Tahoma;font-size: 12pt;}
.plain pre, .plain tt {monospace;font-size: 12pt;}</STYLE>
</HEAD>
<BODY>
<DIV>***Thanks in advance for taking the time to help and respond!&nbsp; - greatly appreciated!!!!</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>I've setup Active Directory Windows Server 2012 R2 and trying to get ssh and sudo access working from CentOS 6.6 (Final) and using sssd 1.11.6</DIV>
<DIV>Note: NOT using Kerberos, samba, adcli,realmd, etc.</DIV>
<DIV>Using:&nbsp; sssd, pam, nsswitch</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm using also OpenLDAP 2.4.39 and was able to get ssh and sudo working against it, so familar with the process.&nbsp; <BR>Now, switching the process to work with AD, I've installed the sudo.schema, rule in AD and added a user, </DIV>
<DIV>&nbsp;</DIV>
<DIV>***but the underlying issue is can't seem to get users to authenticate nor retrieve group information.<BR>ldap_search_ext called, msgid = 8<BR>Search result: No such object(32), no errmsg set<BR>Search for users, returned 0 results.<BR>Failed to retrieve users</DIV>
<DIV>&nbsp;</DIV>
<DIV>---------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>[root@ldap users]# cat /etc/*release<BR>CentOS release 6.6 (Final)</DIV>
<DIV>&nbsp;</DIV>
<DIV>[root@ldap users]# sssd --version<BR>1.11.6</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>I setup a user in AD with the following configuration attributes:</DIV>
<DIV>&nbsp;</DIV>
<DIV>For the User:</DIV>
<DIV>&nbsp;</DIV>
<DIV>cn=abrown<BR>displayName = Angela Brown<BR>distinguishName = CN=abrown,OU=Users,OU=example,DC=ad,DC=example,DC=com<BR>gidNunber = 1500<BR>givenName = Angela<BR>homeDirectory = /home/abrown<BR>mail = <A href="mailto:abrown@example.com">abrown@example.com</A><BR>objectCategory = CN=Person,CN=Schema,CN=Configuration,DC=ad,DC=example,DC=com<BR>objectClass = top,organizationPerson,person,user<BR>objectGUID = F8 B2 23 2D AD B7 26 48 81 29 D0 DA 3D 00 DC B5<BR>objectSid = 01 05 00 00 00 00 00 05 15 00 00 00 F9 F2 D8 AC AE FF 7F B8 FA EA AC 43 66 06 00 00<BR>primaryGroupID = 513 = (GROUP_RID_USERS)<BR>sAMAccountName = abrown<BR>sAMAccountType = 805306368 = (NORMAL_USER_ACCOUNT)<BR>sn = Brown<BR>uid = abrown<BR>userPrincipalName = <A href="mailto:abrown@example.com">abrown@example.com</A></DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>For the Group:</DIV>
<DIV>&nbsp;</DIV>
<DIV>cn = allowedusers<BR>distinguishName = CN=allowedusers,OU=Groups,OU=example,DC=ad,DC=example,DC=com<BR>gidNumber = 1500<BR>member = CN=abrown,OU=Users,OU=example,DC=ad,DC=example,DC=com<BR>objectCategory = CN=Group,CN=Schema,CN=Configuration,DC=ad,DC=example,DC=com<BR>objectClass = top; group<BR>objectGUID = 45 47 DA 79 D7 9E 5E 4B 87 17 E4 7C 71 D0 2E 1F<BR>objectSid = 01 05 00 00 00 00 00 05 15 00 00 00 F9 F2 D8 AC AE FF 7F B8 FA EA AC 43 3D 08 00 00<BR>sAMAccountName = allowedusers<BR>sAMAccountType = 268435456 = (GROUP_OBJECT)</DIV>
<DIV>&nbsp;</DIV>
<DIV>------------------------------------------</DIV>
<DIV>THE ISSUE(S):</DIV>
<DIV>&nbsp;</DIV>
<DIV>So, when I run the 'ls -l' command it's not displaying the name for the user = 2000 and Group name = 1500.<BR>When I do this connected to OpenLDAP it will display as abrown and allowedusers, but not to AD as shown:</DIV>
<DIV>&nbsp;</DIV>
<DIV>[root@ldap users]# ls -l<BR>total 24<BR>drwxr-xr-x. 2 2000 1500 4096 Apr&nbsp; 8 13:46 abrown</DIV>
<DIV>&nbsp;</DIV>
<DIV>I had to manually add this: mkdir abrown <BR>and then: chown 2000:1500 abrown</DIV>
<DIV>&nbsp;</DIV>
<DIV>but if I:&nbsp; "getent passwd abrown" - nothing comes back!</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Running sssd: <BR>[root@ldap log]# /usr/sbin/sssd -i</DIV>
<DIV><BR>.....<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [be_get_account_info] (0x0100): Got request for [4097][1][idnumber=2000]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [be_req_set_domain] (0x0400): Changing request domain from [LDAP] to [LDAP]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_id_op_connect_step] (0x4000): reusing cached connection<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_search_user_next_base] (0x0400): Searching for users with base [ou=Users,ou=example,dc=ad,dc=example,dc=com]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x0400): calling ldap_search_ext with [(&amp;(uidNumber=2000)(objectclass=user)(sAMAccountName=*)(&amp;(uidNumber=*)(!(uidNumber=0))))][ou=Users,ou=example,dc=ad,dc=example,dc=com].<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [objectClass]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [sAMAccountName]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [unixUserPassword]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [uidNumber]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [gidNumber]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [gecos]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [unixHomeDirectory]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [msSFU30LoginShell]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [userPrincipalName]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [displayName]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [memberOf]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [objectSid]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [primaryGroupID]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [whenChanged]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [uSNChanged]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [accountExpires]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [userAccountControl]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x2000): ldap_search_ext called, msgid = 8<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_process_result] (0x2000): Trace: sh[0x1cc4a30], connected[1], ops[0x1cc4990], ldap[0x1cbda50]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_process_message] (0x4000): Message type: [LDAP_RES_SEARCH_RESULT]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_done] (0x0400): Search result: No such object(32), no errmsg set<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_search_user_process] (0x0400): Search for users, returned 0 results.<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_get_users_done] (0x0040): Failed to retrieve users<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_id_op_done] (0x4000): releasing operation connection<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [ldb] (0x4000): Added timed event "ltdb_callback": 0x1d80d70</DIV>
<DIV>&nbsp;</DIV>
<DIV>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [ldb] (0x4000): Added timed event "ltdb_timeout": 0x1d81850</DIV>
<DIV>&nbsp;</DIV>
<DIV>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [ldb] (0x4000): Running timer event 0x1d80d70 "ltdb_callback"</DIV>
<DIV>&nbsp;</DIV>
<DIV>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [ldb] (0x4000): Destroying timer event 0x1d81850 "ltdb_timeout"</DIV>
<DIV>&nbsp;</DIV>
<DIV>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [ldb] (0x4000): Ending timer event 0x1d80d70 "ltdb_callback"</DIV>
<DIV>&nbsp;</DIV>
<DIV>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sysdb_search_user_by_uid] (0x0400): No such entry<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sysdb_delete_user] (0x0400): Error: 2 (No such file or directory)<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [acctinfo_callback] (0x0100): Request processed. Returned 0,0,Success<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_process_result] (0x2000): Trace: sh[0x1cc4a30], connected[1], ops[(nil)], ldap[0x1cbda50]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sdap_process_result] (0x2000): Trace: ldap_result found nothing!<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sbus_dispatch] (0x4000): dbus conn: 0x1cbe2b0<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sbus_dispatch] (0x4000): Dispatching.<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sbus_message_handler] (0x4000): Received SBUS method [getAccountInfo]<BR>(Wed Apr&nbsp; 8 15:07:43 2015) [sssd[be[LDAP]]] [sbus_get_sender_id_send] (0x2000): Not a sysbus message, quit<BR>....</DIV>
<DIV>&nbsp;</DIV>
<DIV>-------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>If I take the filter from within the debug of:&nbsp; (&amp;(gidNumber=1500)(objectClass=group)(name=*)(&amp;(gidNumber=*)(!(gidNumber=0)))<BR>&nbsp;and perform a ldapsearch, it pulls back the correct results:</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>[root@ldap ~]# ldapsearch -D "cn=adaccess,ou=adaccts,ou=example,dc=ad,dc=example,dc=com" -w 'password here' -b "DC=ad,DC=example,DC=com" -h adservername.example.com '(&amp;(gidNumber=1500)(objectClass=group)(name=*)(&amp;(gidNumber=*)(!(gidNumber=0))))'<BR># extended LDIF<BR>#<BR># LDAPv3<BR># base &lt;DC=ad,DC=example,DC=com&gt; with scope subtree<BR># filter: (&amp;(gidNumber=1500)(objectClass=group)(name=*)(&amp;(gidNumber=*)(!(gidNumber=0))))<BR># requesting: ALL<BR>#</DIV>
<DIV>&nbsp;</DIV>
<DIV># allowedusers, Groups, example, ad.example.com<BR>dn: CN=allowedusers,OU=Groups,OU=example,DC=ad,DC=example,DC=com<BR>objectClass: top<BR>objectClass: group<BR>cn: allowedusers<BR>member: CN=abrown,OU=Users,OU=example,DC=ad,DC=example,DC=com<BR>distinguishedName: CN=allowedusers,OU=Groups,OU=example,DC=ad,DC=example,DC=<BR>&nbsp;com<BR>instanceType: 4<BR>whenCreated: 20150408174301.0Z<BR>whenChanged: 20150408174359.0Z<BR>uSNCreated: 81925<BR>uSNChanged: 81931<BR>name: allowedusers<BR>objectGUID:: RUfaedeeXkuHF+R8cdAuHw==<BR>objectSid:: AQUAAAAAAAUVAAAA+fLYrK7/f7j66qxDPQgAAA==<BR>sAMAccountName: allowedusers<BR>sAMAccountType: 268435456<BR>groupType: -2147483646<BR>objectCategory: CN=Group,CN=Schema,CN=Configuration,DC=ad,DC=example,DC=com<BR>dSCorePropagationData: 16010101000000.0Z<BR>gidNumber: 1500</DIV>
<DIV>&nbsp;</DIV>
<DIV># search reference<BR>ref: <A href="ldap://DomainDnsZones.ad.example.com/DC=DomainDnsZones,DC=ad,DC=example">ldap://DomainDnsZones.ad.example.com/DC=DomainDnsZones,DC=ad,DC=example</A><BR>&nbsp;,DC=com</DIV>
<DIV>&nbsp;</DIV>
<DIV># search reference<BR>ref: <A href="ldap://ForestDnsZones.ad.example.com/DC=ForestDnsZones,DC=ad,DC=example">ldap://ForestDnsZones.ad.example.com/DC=ForestDnsZones,DC=ad,DC=example</A><BR>&nbsp;,DC=com</DIV>
<DIV>&nbsp;</DIV>
<DIV># search reference<BR>ref: <A href="ldap://ad.example.com/CN=Configuration,DC=ad,DC=example,DC=com">ldap://ad.example.com/CN=Configuration,DC=ad,DC=example,DC=com</A></DIV>
<DIV>&nbsp;</DIV>
<DIV># search result<BR>search: 2<BR>result: 0 Success</DIV>
<DIV>&nbsp;</DIV>
<DIV># numResponses: 5<BR># numEntries: 1<BR># numReferences: 3</DIV>
<DIV>&nbsp;</DIV>
<DIV>--------------------------------------<BR>Setup of sssd.conf</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>[root@ldap sssd]# cat sssd.conf<BR>[domain/default]</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_id_use_start_tls = True<BR>cache_credentials = True<BR>ldap_search_base = dc=example,dc=com<BR>id_provider = ldap<BR>auth_provider = ldap<BR>chpass_provider = ldap<BR>ldap_uri = <A href="ldaps://ldap.va.example.com">ldaps://ldap.va.example.com</A><BR>ldap_tls_cacertdir = /etc/pki/tls/certs</DIV>
<DIV>&nbsp;</DIV>
<DIV>[sssd]<BR>config_file_version = 2<BR>services = nss, pam, sudo<BR>domains = LDAP</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>[nss]<BR>filter_users = root<BR>filter_groups = root</DIV>
<DIV>&nbsp;</DIV>
<DIV>[pam]</DIV>
<DIV>&nbsp;</DIV>
<DIV>[sudo]</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>[domain/LDAP]<BR>access_provider = ldap<BR>auth_provider = ldap<BR>chpass_provider = ldap<BR>id_provider = ldap<BR>sudo_provider = ldap<BR>debug_level = 9<BR>cache_credentials = true<BR>enumerate = false</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_uri = <A href="ldaps://ldapservername.example.com">ldaps://ldapservername.example.com</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_default_bind_dn = CN=Manager,DC=example,DC=com<BR>ldap_default_authtok_type = password<BR>ldap_default_authtok = passwordhere<BR>ldap_access_filter = ou=users,ou=example,dc=ad,dc=example,dc=com</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_search_base = dc=example,dc=com</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_schema = ad</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_user_principal = userPrincipalName<BR>ldap_user_fullname = displayName<BR>ldap_user_name = sAMAccountName<BR>ldap_user_object_class = user<BR>ldap_user_home_directory = unixHomeDirectory<BR>ldap_user_shell = msSFU30LoginShell<BR>ldap_user_principal = userPrincipalName<BR>ldap_user_objectsid = objectSid</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_group_object_class = group<BR>ldap_group_objectsid = objectGUID</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>ldap_sudo_search_base = ou=sudoers,dc=ad,dc=example,dc=com</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_user_search_base = ou=Users,ou=example,dc=ad,dc=example,dc=com<BR>ldap_group_search_base = ou=Groups,ou=example,dc=ad,dc=example,dc=com</DIV>
<DIV>&nbsp;</DIV>
<DIV>ldap_tls_cacert = /etc/pki/tls/certs/certnamehere.crt</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;</DIV></BODY></HTML>