<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Not able to sync users of Active Directory in Active Directory in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100256#M63275</link>
    <description>&lt;P&gt;Thanks Robert,&lt;/P&gt;&lt;P&gt;By executing the ldapsearch I get the :&lt;/P&gt;&lt;PRE&gt;# Darpan Patel, Users, test.com
dn: CN=Darpan Patel,CN=Users,DC=test,DC=com
# search result
search: 2
result: 0 Success&lt;/PRE&gt;&lt;P&gt;I also made changes : authentication.ldap.dnAttribute=distinguishedName .&lt;/P&gt;&lt;P&gt;However when I give admin/admin while doing sync outcome is :&lt;/P&gt;&lt;P&gt;[root@gateway ~]# ambari-server sync-ldap --all &lt;/P&gt;&lt;P&gt;Using python  /usr/bin/python2.7
Syncing with LDAP... &lt;/P&gt;&lt;P&gt;Enter Ambari Admin login: admin &lt;/P&gt;&lt;P&gt;Enter Ambari Admin password:
Syncing all.ERROR: Exiting with exit code 1.
REASON: Sync event creation failed. Error details: HTTP Error 403: Bad credentials&lt;/P&gt;</description>
    <pubDate>Mon, 21 Dec 2015 21:08:17 GMT</pubDate>
    <dc:creator>darpan_be</dc:creator>
    <dc:date>2015-12-21T21:08:17Z</dc:date>
    <item>
      <title>Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100254#M63273</link>
      <description>&lt;P&gt;
	Hi Experts, &lt;/P&gt;&lt;P&gt;
	I am trying to integrate A/D 2012 Server with Ambari 2.1.2. HDP version 2.3. &lt;/P&gt;&lt;P&gt;
	I've tried various permutation combinations with the properties but still I am not successful in integrating the AD with Ambari. I could successfully integrate AD with Ranger and Knox trying to use the properties in the similar lines. &lt;/P&gt;&lt;P&gt;
	Active directory domain controller name is : TEST.COM, AD is running on 10.0.2.10 
One of the valid users in AD is "Darpan Patel" and has the principal : darpan@TEST.COM and all the users are in "Users" container.&lt;/P&gt;&lt;P&gt;
We are running Ambari as a root user. &lt;/P&gt;&lt;P&gt;
	Here are the properties I am setting for Ambari - AD integration from /etc/ambari-server/conf/ambari.properties &lt;/P&gt;
&lt;PRE&gt;api.authenticate=true
authentication.ldap.baseDn=CN=Users,DC=test,DC=com 
authentication.ldap.bindAnonymously=false 
authentication.ldap.dnAttribute=CN=Users,DC=test,DC=com 
authentication.ldap.groupMembershipAttr=uid 
authentication.ldap.groupNamingAttr=cn 
authentication.ldap.groupObjectClass=group 
authentication.ldap.managerDn=CN=Darpan Patel,CN=users,DC=test,DC=com 
# also tried with 
# CN=users,DC=test,DC=com 
# CN=darpan,DC=test,DC=com 
# CN=darpan@TEST.COM,DC=test,DC=com
authentication.ldap.managerPassword=/etc/ambari-server/conf/ldap-password.dat
authentication.ldap.primaryUrl=10.0.2.10:389
authentication.ldap.referral=ignore
authentication.ldap.secondaryUrl=10.0.2.10:389
authentication.ldap.useSSL=false
authentication.ldap.userObjectClass=person
authentication.ldap.usernameAttribute=sAMAccountName 
&lt;/PRE&gt;&lt;P&gt;
Here is the list of sequence what I am trying to do:&lt;/P&gt;&lt;OL&gt;
&lt;LI&gt;$ ambari-server setup-ldap &lt;/LI&gt;&lt;LI&gt;Enter the above properties &lt;/LI&gt;&lt;LI&gt;Restart the ambari server &lt;/LI&gt;&lt;LI&gt;$ambari-server sync-ldap --all &lt;/LI&gt;&lt;LI&gt;Enter admin id/password (i.e. default Ambari Admin userid : admin/admin) also tried with darpan, darpan@TEST.COM &lt;/LI&gt;&lt;LI&gt;In all the cases I see : &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;
Syncing all.ERROR: Exiting with exit code 1.
REASON: Sync event creation failed. Error details: HTTP Error 403: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1] &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;
	7) Log shows : &lt;/P&gt;&lt;P&gt;
18 Dec 2015 10:27:34,899  WARN [qtp-client-26] AmbariLdapAuthenticationProvider:71 - Looks like LDAP manager credentials (that are used for connecting to LDAP server) are invalid.
org.springframework.security.authentication.InternalAuthenticationServiceException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1] &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
	I thought that password could be wrong for the AD user but with the same ad user I am able to issue a TGT.
i.e. for the user in ambari properties : authentication.ldap.managerDn=CN=Darpan Patel,CN=users,DC=test,DC=com
I am able to get a ticket : kinit darpan@TEST.COM. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;------------------&lt;/P&gt;&lt;P&gt;
	Interesting thing is : I am no longer to login to Ambari using admin/admin user. On the ambari portal : when I use admin/admin it says invalid credentials.  So I tried resetting the password to default by changing in the ambari.users db (update ambari.users set user_password='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00' where user_name='admin') &lt;/P&gt;&lt;P&gt;
	To my curiosity when I see the ambari.users table few of the A/D users are present in the table. for example :&lt;/P&gt;&lt;P&gt;
ambari=&amp;gt; select * from ambari.users; &lt;/P&gt;&lt;BLOCKQUOTE&gt;
&lt;P&gt;
	 user_id | principal_id | ldap_user |   user_name   |        create_time         | active | &lt;/P&gt;&lt;P&gt;
 --------+--------------+-----------+---------------+----------------------------+------ &lt;/P&gt;&lt;P&gt;
	      12 |            4 |         1 | pratlu        | 2015-12-17 17:49:05.699    |1 | &lt;/P&gt;&lt;P&gt;
	       3 |            6 |1 | darpan        | 2015-12-17 17:49:05.699    |1 | &lt;/P&gt;&lt;P&gt;
	      13 |            3 |         1 | administrator | 2015-12-17 17:49:05.699    |1 |&lt;/P&gt;&lt;P&gt;
       4 |            5 |         1 | test          | 2015-12-17 17:49:05.699    |1 | &lt;/P&gt;&lt;P&gt;
	      14 |           11 |         1 | sanjay.sharma | 2015-12-17 17:49:05.699    |1 |&lt;/P&gt;&lt;P&gt;	I also tried logging in to ambari web console using darpan, darpan@TEST.COM, admin/admin but it does not work!! &lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;
	Did any one face similar issue ? Or can anyone suggest work around?&lt;/P&gt;&lt;P&gt;
	Regards,&lt;/P&gt;&lt;P&gt;
	DP&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 19:43:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100254#M63273</guid>
      <dc:creator>darpan_be</dc:creator>
      <dc:date>2015-12-21T19:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100255#M63274</link>
      <description>&lt;P&gt;Try doing a search for the principal you are using to make sure it's record has the same DN as the one you are using as the Kerberos identity.&lt;/P&gt;&lt;PRE&gt;ldapsearch -h 10.0.2.10 -D darpan@TEST.COM -W -b CN=Users,DC=test,DC=com '(userPrincipalName=darpan@TEST.COM)' dn&lt;/PRE&gt;&lt;P&gt;Also, I noticed that your distinguished name attribute is still incorrect:&lt;/P&gt;&lt;PRE&gt;Is: 
  authentication.ldap.dnAttribute=CN=Users,DC=test,DC=com 
Should Be:
  authentication.ldap.dnAttribute=distinguishedName
&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Dec 2015 20:20:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100255#M63274</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2015-12-21T20:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100256#M63275</link>
      <description>&lt;P&gt;Thanks Robert,&lt;/P&gt;&lt;P&gt;By executing the ldapsearch I get the :&lt;/P&gt;&lt;PRE&gt;# Darpan Patel, Users, test.com
dn: CN=Darpan Patel,CN=Users,DC=test,DC=com
# search result
search: 2
result: 0 Success&lt;/PRE&gt;&lt;P&gt;I also made changes : authentication.ldap.dnAttribute=distinguishedName .&lt;/P&gt;&lt;P&gt;However when I give admin/admin while doing sync outcome is :&lt;/P&gt;&lt;P&gt;[root@gateway ~]# ambari-server sync-ldap --all &lt;/P&gt;&lt;P&gt;Using python  /usr/bin/python2.7
Syncing with LDAP... &lt;/P&gt;&lt;P&gt;Enter Ambari Admin login: admin &lt;/P&gt;&lt;P&gt;Enter Ambari Admin password:
Syncing all.ERROR: Exiting with exit code 1.
REASON: Sync event creation failed. Error details: HTTP Error 403: Bad credentials&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 21:08:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100256#M63275</guid>
      <dc:creator>darpan_be</dc:creator>
      <dc:date>2015-12-21T21:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100257#M63276</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1660/darpanbe.html" nodeid="1660"&gt;@Darpan Patel&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;&lt;A href="https://confluence.atlassian.com/display/CONFKB/User+directory+sync+fails+with+LDAP+Error+Code+49"&gt;https://confluence.atlassian.com/display/CONFKB/Us...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;52einvalid credentials
&lt;/P&gt;&lt;P&gt;Regarding: admin use invalid credentials, it looks like your AD setup did change admin user settings in the database. &lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;ambari213=&amp;gt; select ldap_user from users where user_name='admin';&lt;/P&gt;&lt;P&gt; ldap_user &lt;/P&gt;&lt;P&gt;-----------&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;(1 row)&lt;/P&gt;&lt;P&gt;ambari213=&amp;gt; update users set ldap_user=0 where user_name='admin';&lt;/P&gt;&lt;P&gt;UPDATE 1&lt;/P&gt;&lt;P&gt;ambari213=&amp;gt; &lt;/P&gt;&lt;P&gt;ambari213=&amp;gt; select ldap_user from users where user_name='admin';&lt;/P&gt;&lt;P&gt; ldap_user &lt;/P&gt;&lt;P&gt;-----------&lt;/P&gt;&lt;P&gt;        0&lt;/P&gt;&lt;P&gt;(1 row)&lt;/P&gt;&lt;P&gt;then try login with admin cred.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 21:18:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100257#M63276</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2015-12-21T21:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100258#M63277</link>
      <description>&lt;P&gt;I logged in to Ambari database and &lt;A target="_blank" href="https://hadooptips.wordpress.com/2015/12/18/resetting-ambari-admin-password/"&gt;resetted the password&lt;/A&gt; to 'admin'. But still it did not work. &lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 21:30:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100258#M63277</guid>
      <dc:creator>darpan_be</dc:creator>
      <dc:date>2015-12-21T21:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100259#M63278</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1660/darpanbe.html" nodeid="1660"&gt;@Darpan Patel&lt;/A&gt; Please see my previous message. It seems like that your admin user is set to ldap user. &lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 21:35:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100259#M63278</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2015-12-21T21:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100260#M63279</link>
      <description>&lt;P&gt;You were right. The admin users had ldap_user flag set to 1. Not sure how it changed it...&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 21:41:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100260#M63279</guid>
      <dc:creator>darpan_be</dc:creator>
      <dc:date>2015-12-21T21:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100261#M63280</link>
      <description>&lt;P&gt;One more observation &lt;A rel="user" href="https://community.cloudera.com/users/140/nsabharwal.html" nodeid="140"&gt;@Neeraj Sabharwal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;: I updated the admin user's ldap_user flag to 0 as you mentioned and tried running the ambari ldap sync operation . &lt;/P&gt;&lt;P&gt;On the console get the error :&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Enter Ambari Admin password:
Syncing all.......&lt;/P&gt;&lt;P&gt;ERROR: Exiting with exit code 1. &lt;/P&gt;&lt;P&gt;REASON: Sync event check failed. Error details: HTTP Error 403: Bad credentials&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Now I am checking the users table in the ambari database. I see &lt;STRONG&gt;few more users have been imported&lt;/STRONG&gt; in the user's table. And the &lt;STRONG&gt;admin user's ldap_user flag is again set to 1&lt;/STRONG&gt;. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 21:50:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100261#M63280</guid>
      <dc:creator>darpan_be</dc:creator>
      <dc:date>2015-12-21T21:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100262#M63281</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1660/darpanbe.html" nodeid="1660"&gt;@Darpan Patel&lt;/A&gt; Perfect! It looks like the ldap sync is working but you need to check credentials. &lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 21:52:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100262#M63281</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2015-12-21T21:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100263#M63282</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/140/nsabharwal.html" nodeid="140"&gt;@Neeraj Sabharwal&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Yeah looks like users are getting Synch-ed.&lt;/P&gt;&lt;P&gt;However I think here is the problem that : local user admin is being changed to ldap user ( flag changes in the user table) Is it expected behavior ?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 22:34:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100263#M63282</guid>
      <dc:creator>darpan_be</dc:creator>
      <dc:date>2015-12-21T22:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100264#M63283</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1660/darpanbe.html" nodeid="1660"&gt;@Darpan Patel&lt;/A&gt;  Do you have admin user in AD? I guess yes &lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 23:13:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100264#M63283</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2015-12-21T23:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100265#M63284</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/140/nsabharwal.html" nodeid="140"&gt;@Neeraj Sabharwal&lt;/A&gt;I've a local KDC. in the local KDC I've admin/admin but non in the AD. &lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 23:46:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100265#M63284</guid>
      <dc:creator>darpan_be</dc:creator>
      <dc:date>2015-12-21T23:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to sync users of Active Directory in Active Directory</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100266#M63285</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1660/darpanbe.html" nodeid="1660"&gt;@Darpan Patel&lt;/A&gt; Ok. If issue is resolved then please accept one of the answers to close the thread. &lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2015 23:48:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Not-able-to-sync-users-of-Active-Directory-in-Active/m-p/100266#M63285</guid>
      <dc:creator>nsabharwal</dc:creator>
      <dc:date>2015-12-21T23:48:20Z</dc:date>
    </item>
  </channel>
</rss>

