<?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: Kerberos  add_principal: Insufficient access to lock database while creating in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberos-add-principal-Insufficient-access-to-lock-database/m-p/176909#M67691</link>
    <description>&lt;P&gt;&lt;EM&gt;@&lt;A href="https://community.hortonworks.com/users/19015/xpelive.html"&gt;forest lin&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;There are a couple of things that might have gone wrong.&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;How many nodes in your cluster? 
Have you successfully enabled it through the Ambari wizard? 
Did you copy the krb5.conf from the KC to all hosts? 
Make sure your KDC is up and running ensure autostart on OS reboot is enabled. &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I noticed you used REALM in lowercase &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;kadmin -p admin/admin@dev.com&lt;/STRONG&gt; it should be &lt;STRONG&gt;kadmin -p admin/admin@DEV.COM&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can you copy and paste the contents following config files. Remember to mask sensitive info ONLY &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;krb5.conf 
kadm5.acl 
kdc.conf &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Can you log on to the KDC using see below or sudo option where applicable &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# kadmin.local 
# sudo kadmin.local 
Authenticating as principal admin/admin@DEV.COM with password. 
kadmin.local: addprinc test3@DEV.COM 
WARNING: no policy specified for test3@DEV.COM; defaulting to no policy 
Enter password for principal "test3@DEV.COM": 
Re-enter password for principal "test3@DEV.COM": {Master_KDC_password} 
Principal "test3@DEV.COM" created &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Type q to quit kadmin. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Create a keytab  in the current directory for the test3 user (use appropriate command) &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# sudo ktutil 
# ktutil ktutil: addent -password -p test3@DEV.COM -k 1 -e RC4-HMAC 
Password for test3@DEV.COM: 
ktutil: wkt test3.keytab 
ktutil: q &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Copy the keytab to test3 user home directory and change the permissions &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# chown test3:test3 test3.keytab &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Test the validity of the keytab against the principal created earlier on &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# klist -kt /etc/security/keytabs/test3.keytab 
Keytab name: FILE:/etc/security/keytabs/test3.keytab 
KVNO                       Timestamp                      Principal 
----------------------------------------------------------------------------- 
1                       07/18/2017 10:46:27               test3@DEV.COM &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Grab a Kerberos ticket note the concatenation of keytab/principal &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# kinit -kt /etc/security/keytabs/test3.keytab test3@DEV.COM &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Check if the above command gives a valid Kerberos ticket &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# klist 
Ticket cache: FILE:/tmp/krb5cc_0 
Default principal: test3@DEV.COM 
Valid starting 	              Expires                        Service principal 
07/18/2017 10:53:48           07/19/2017 10:53:48            krbtgt/DEV.COM@DEV.COM &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;All is set if need be repeat the above for all users you intend to create &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please revert&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2017 04:46:35 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2017-09-07T04:46:35Z</dc:date>
    <item>
      <title>Kerberos  add_principal: Insufficient access to lock database while creating</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberos-add-principal-Insufficient-access-to-lock-database/m-p/176908#M67690</link>
      <description>&lt;P&gt;I'd like enable kerberos for hdp2.6.1 on ubuntu16.04 and i follow below guideline&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-security/content/optional_install_a_new_mit_kdc.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-security/content/optional_install_a_new_mit_kdc.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-security/content/enabling_kerberos_security_in_ambari.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-security/content/enabling_kerberos_security_in_ambari.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;After install kerberos client in all hosts, it failed in the Test kerberos step with:&lt;/P&gt;&lt;P&gt;add_principal: Insufficient access to lock database while creating "dakelake-090617@dev.com"&lt;/P&gt;&lt;P&gt;I have trid to disable selinux (ref &lt;A href="http://manpages.ubuntu.com/manpages/xenial/man8/kerberos_selinux.8.html)" target="_blank"&gt;http://manpages.ubuntu.com/manpages/xenial/man8/kerberos_selinux.8.html)&lt;/A&gt; but no luck.&lt;/P&gt;&lt;P&gt;i also tried to login kdc with kadmin -p admin/admin@dev.com then run "addprinc test3@dev.com" , it prompted with the same error.&lt;/P&gt;&lt;P&gt;Would anyone encouter this and having any solution or hints?  &lt;/P&gt;&lt;P&gt;Thanks a ton.&lt;/P&gt;&lt;P&gt;Forest&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 12:12:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberos-add-principal-Insufficient-access-to-lock-database/m-p/176908#M67690</guid>
      <dc:creator>xpelive</dc:creator>
      <dc:date>2022-09-16T12:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos  add_principal: Insufficient access to lock database while creating</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberos-add-principal-Insufficient-access-to-lock-database/m-p/176909#M67691</link>
      <description>&lt;P&gt;&lt;EM&gt;@&lt;A href="https://community.hortonworks.com/users/19015/xpelive.html"&gt;forest lin&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;There are a couple of things that might have gone wrong.&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;How many nodes in your cluster? 
Have you successfully enabled it through the Ambari wizard? 
Did you copy the krb5.conf from the KC to all hosts? 
Make sure your KDC is up and running ensure autostart on OS reboot is enabled. &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;I noticed you used REALM in lowercase &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;kadmin -p admin/admin@dev.com&lt;/STRONG&gt; it should be &lt;STRONG&gt;kadmin -p admin/admin@DEV.COM&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Can you copy and paste the contents following config files. Remember to mask sensitive info ONLY &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;krb5.conf 
kadm5.acl 
kdc.conf &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Can you log on to the KDC using see below or sudo option where applicable &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# kadmin.local 
# sudo kadmin.local 
Authenticating as principal admin/admin@DEV.COM with password. 
kadmin.local: addprinc test3@DEV.COM 
WARNING: no policy specified for test3@DEV.COM; defaulting to no policy 
Enter password for principal "test3@DEV.COM": 
Re-enter password for principal "test3@DEV.COM": {Master_KDC_password} 
Principal "test3@DEV.COM" created &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Type q to quit kadmin. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Create a keytab  in the current directory for the test3 user (use appropriate command) &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# sudo ktutil 
# ktutil ktutil: addent -password -p test3@DEV.COM -k 1 -e RC4-HMAC 
Password for test3@DEV.COM: 
ktutil: wkt test3.keytab 
ktutil: q &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Copy the keytab to test3 user home directory and change the permissions &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# chown test3:test3 test3.keytab &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Test the validity of the keytab against the principal created earlier on &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# klist -kt /etc/security/keytabs/test3.keytab 
Keytab name: FILE:/etc/security/keytabs/test3.keytab 
KVNO                       Timestamp                      Principal 
----------------------------------------------------------------------------- 
1                       07/18/2017 10:46:27               test3@DEV.COM &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Grab a Kerberos ticket note the concatenation of keytab/principal &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# kinit -kt /etc/security/keytabs/test3.keytab test3@DEV.COM &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Check if the above command gives a valid Kerberos ticket &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;&lt;EM&gt;# klist 
Ticket cache: FILE:/tmp/krb5cc_0 
Default principal: test3@DEV.COM 
Valid starting 	              Expires                        Service principal 
07/18/2017 10:53:48           07/19/2017 10:53:48            krbtgt/DEV.COM@DEV.COM &lt;/EM&gt;&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;All is set if need be repeat the above for all users you intend to create &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please revert&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 04:46:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberos-add-principal-Insufficient-access-to-lock-database/m-p/176909#M67691</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2017-09-07T04:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Kerberos  add_principal: Insufficient access to lock database while creating</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberos-add-principal-Insufficient-access-to-lock-database/m-p/176910#M67692</link>
      <description>&lt;P&gt;Thanks advince. &lt;/P&gt;&lt;P&gt;The issue was resolved after changing the realms name from &lt;STRONG&gt;dev.com&lt;/STRONG&gt; to &lt;STRONG&gt;DEV.COM&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 13:01:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kerberos-add-principal-Insufficient-access-to-lock-database/m-p/176910#M67692</guid>
      <dc:creator>xpelive</dc:creator>
      <dc:date>2017-09-07T13:01:31Z</dc:date>
    </item>
  </channel>
</rss>

