<?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: Adding user to Kerberised MIT KDC cluster in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Adding-user-to-Kerberised-MIT-KDC-cluster/m-p/189222#M78150</link>
    <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Mudit Kumar"&gt; @Mudit Kumar&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You have deployed and secured your multi-node-cluster with an MIT KDC running on a Linux box (dedicated or not), this can also be applied on a single node cluster.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Below is a step by step procedure&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Assumption&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt; KDC is running &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;KDC is created &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;KDC user and master password is available &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;REALM: DEV.COM &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Users : user1,user2,user3-user5&lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Edge node: for users Kerberos &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Admin user is root or sudoer &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;A good solution security-wise is to copy the generated keytabs to the users'home directory. If these are local Unix users NOT Active directory then create the keytabs in &lt;STRONG&gt;e.g /tmp&lt;/STRONG&gt; and later copy them to their respective home directories and make sure to change the correct permissions on the keytabs. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You will notice a node dedicated to users EDGE NODE, all client software are installed here and not on the data or name nodes! &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Change directory to tmp&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# cd /tmp &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;With root access, no need for sudo, specify the password for user1&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# sudo kadmin.local 
Authenticating as principal root/admin@DEV.COM with password. 
kadmin.local: addprinc user1@DEV.COM 
WARNING: no policy specified for user1@DEV.COM; defaulting to no policy 
Enter password for principal "user1@DEV.COM": 
Re-enter password for principal "user1@DEV.COM": 
Principal "user1@DEV.COM" created. &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Do the above step for for all the other users too &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;addprinc user2@DEV.COM 
addprinc user3@DEV.COM 
addprinc user4@DEV.COM 
addprinc user5@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;The keytabs with be generated in the current directory &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Generate keytab for user1 &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The keytab will be generated in the current directory&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# sudo ktutil 
ktutil: addent -password -p user1@DEV.COM -k 1 -e RC4-HMAC 
Password for user1@DEV.COM: 
ktutil: wkt user1.keytab 
ktutil: q &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;You MUST repeat the above for all the 5 users &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Copy the newly created keytab to the user's home directory, in this example I have copied the keytab to /etc/security/keytabs &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# cp user1.keytab  /etc/security/keytabs&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Change ownership &amp;amp; permission here &lt;STRONG&gt;user1&lt;/STRONG&gt; belongs to &lt;B&gt;hadmin  &lt;/B&gt;group&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# chown user1:hadmin user1.keytab &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Again do the above for all the other users. A good technical and security best practice is to copy the keytabs from the &lt;B&gt;kdc&lt;/B&gt; to &lt;B&gt;edgenode&lt;/B&gt; respective home directories and change the ownership of the  keytabs &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Validate the principals in this example the keytabs are in&lt;STRONG&gt; /etc/security/&lt;/STRONG&gt;&lt;STRONG&gt;keytabs &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# klist -kt /etc/security/keytabs/user1.keytab 
Keytab name: FILE:/etc/security/keytabs/user1.keytab 
KVNO         Timestamp                   Principal 
-----------  ------------------- ------------------------------------------------------ 
1            05/10/2018 10:46:27         user1@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;To ensure successful ticket attribution the user should validate the principal  see example below and use it grab a ticket , the principal will be concatenated with the keytab  when running the&lt;STRONG&gt; kinit&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# klist -kt /etc/security/keytabs/user1.keytab 
Keytab name: FILE:/etc/security/keytabs/user1.keytab
KVNO     Timestamp                 Principal
-------- ------------------------ --------------------------------------------------------
1        05/10/18 01:00:50        user1@DEV.COM
....    ..................        ..............
1        05/10/18 01:00:50        user1@DEV.COM
&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Test the new &lt;STRONG&gt;user1&lt;/STRONG&gt; should try grabbing a Kerberos ticket  (&lt;STRONG&gt;keytab + principal&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# kinit -kt /etc/security/keytabs/user1.keytab  user1@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;The below command should show the validity of the Kerberos ticket &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# klist 
Ticket cache: FILE:/tmp/krb5cc_0 
Default principal: user1@DEV.COM 
Valid starting             Expires               Service principal 
05/10/2018 10:53:48        05/11/2018 10:53:48   krbtgt/DEV.COM@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;You should be okay now access and successfully run jobs on the cluster&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 May 2018 04:20:25 GMT</pubDate>
    <dc:creator>Shelton</dc:creator>
    <dc:date>2018-05-11T04:20:25Z</dc:date>
    <item>
      <title>Adding user to Kerberised MIT KDC cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Adding-user-to-Kerberised-MIT-KDC-cluster/m-p/189220#M78148</link>
      <description>&lt;P&gt;I have setup my kerberised dev cluster.I now need to add 5 users to my cluster who can can access hdfs,hive,hbase,submit spark jobs.I have MIT KDC installed on one of the node.Any link or documentation will be helpful.TIA.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:12:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Adding-user-to-Kerberised-MIT-KDC-cluster/m-p/189220#M78148</guid>
      <dc:creator>muditcse</dc:creator>
      <dc:date>2022-09-16T13:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding user to Kerberised MIT KDC cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Adding-user-to-Kerberised-MIT-KDC-cluster/m-p/189221#M78149</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1637/muditcse.html" nodeid="1637"&gt;@Mudit Kumar&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;for adding your users you need to create principals for them in the Kerberos database.&lt;/P&gt;&lt;P&gt;e.g. connect to the node where MIT-KDC is running, then&lt;/P&gt;&lt;PRE&gt;sudo kadmin.local "addprinc &amp;lt;username&amp;gt;" &lt;/PRE&gt;&lt;P&gt;#replace &amp;lt;username&amp;gt; by your real usernames&lt;/P&gt;&lt;P&gt;So that you are able to grab a valid Kerberos ticket for those 5 users. You can verify this by executing&lt;/P&gt;&lt;PRE&gt;kinit &amp;lt;username&amp;gt;&lt;/PRE&gt;&lt;P&gt;this should ask for the corresponding password of that user (!! the password you provided at creation time of the principal above !!), followed by &lt;/P&gt;&lt;PRE&gt;klist&lt;/PRE&gt;&lt;P&gt;After grabbing a Kerberos ticket you can start executing commands to the cluster, like "hdfs dfs -ls"&lt;/P&gt;&lt;P&gt;If you have enabled authorization as well, you have to add those new users to the ACLs appropriately.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 01:24:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Adding-user-to-Kerberised-MIT-KDC-cluster/m-p/189221#M78149</guid>
      <dc:creator>geko</dc:creator>
      <dc:date>2018-05-11T01:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding user to Kerberised MIT KDC cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Adding-user-to-Kerberised-MIT-KDC-cluster/m-p/189222#M78150</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;A href="@Mudit Kumar"&gt; @Mudit Kumar&lt;/A&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You have deployed and secured your multi-node-cluster with an MIT KDC running on a Linux box (dedicated or not), this can also be applied on a single node cluster.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Below is a step by step procedure&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Assumption&lt;/STRONG&gt; &lt;/EM&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt; KDC is running &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;KDC is created &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;KDC user and master password is available &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;REALM: DEV.COM &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Users : user1,user2,user3-user5&lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Edge node: for users Kerberos &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Admin user is root or sudoer &lt;BR /&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;A good solution security-wise is to copy the generated keytabs to the users'home directory. If these are local Unix users NOT Active directory then create the keytabs in &lt;STRONG&gt;e.g /tmp&lt;/STRONG&gt; and later copy them to their respective home directories and make sure to change the correct permissions on the keytabs. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You will notice a node dedicated to users EDGE NODE, all client software are installed here and not on the data or name nodes! &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Change directory to tmp&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# cd /tmp &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;With root access, no need for sudo, specify the password for user1&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# sudo kadmin.local 
Authenticating as principal root/admin@DEV.COM with password. 
kadmin.local: addprinc user1@DEV.COM 
WARNING: no policy specified for user1@DEV.COM; defaulting to no policy 
Enter password for principal "user1@DEV.COM": 
Re-enter password for principal "user1@DEV.COM": 
Principal "user1@DEV.COM" created. &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Do the above step for for all the other users too &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;addprinc user2@DEV.COM 
addprinc user3@DEV.COM 
addprinc user4@DEV.COM 
addprinc user5@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;The keytabs with be generated in the current directory &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Generate keytab for user1 &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The keytab will be generated in the current directory&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# sudo ktutil 
ktutil: addent -password -p user1@DEV.COM -k 1 -e RC4-HMAC 
Password for user1@DEV.COM: 
ktutil: wkt user1.keytab 
ktutil: q &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;You MUST repeat the above for all the 5 users &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Copy the newly created keytab to the user's home directory, in this example I have copied the keytab to /etc/security/keytabs &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# cp user1.keytab  /etc/security/keytabs&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Change ownership &amp;amp; permission here &lt;STRONG&gt;user1&lt;/STRONG&gt; belongs to &lt;B&gt;hadmin  &lt;/B&gt;group&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# chown user1:hadmin user1.keytab &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Again do the above for all the other users. A good technical and security best practice is to copy the keytabs from the &lt;B&gt;kdc&lt;/B&gt; to &lt;B&gt;edgenode&lt;/B&gt; respective home directories and change the ownership of the  keytabs &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Validate the principals in this example the keytabs are in&lt;STRONG&gt; /etc/security/&lt;/STRONG&gt;&lt;STRONG&gt;keytabs &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# klist -kt /etc/security/keytabs/user1.keytab 
Keytab name: FILE:/etc/security/keytabs/user1.keytab 
KVNO         Timestamp                   Principal 
-----------  ------------------- ------------------------------------------------------ 
1            05/10/2018 10:46:27         user1@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;To ensure successful ticket attribution the user should validate the principal  see example below and use it grab a ticket , the principal will be concatenated with the keytab  when running the&lt;STRONG&gt; kinit&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# klist -kt /etc/security/keytabs/user1.keytab 
Keytab name: FILE:/etc/security/keytabs/user1.keytab
KVNO     Timestamp                 Principal
-------- ------------------------ --------------------------------------------------------
1        05/10/18 01:00:50        user1@DEV.COM
....    ..................        ..............
1        05/10/18 01:00:50        user1@DEV.COM
&lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;Test the new &lt;STRONG&gt;user1&lt;/STRONG&gt; should try grabbing a Kerberos ticket  (&lt;STRONG&gt;keytab + principal&lt;/STRONG&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# kinit -kt /etc/security/keytabs/user1.keytab  user1@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;The below command should show the validity of the Kerberos ticket &lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;# klist 
Ticket cache: FILE:/tmp/krb5cc_0 
Default principal: user1@DEV.COM 
Valid starting             Expires               Service principal 
05/10/2018 10:53:48        05/11/2018 10:53:48   krbtgt/DEV.COM@DEV.COM &lt;/PRE&gt;&lt;P&gt;&lt;EM&gt;You should be okay now access and successfully run jobs on the cluster&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 04:20:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Adding-user-to-Kerberised-MIT-KDC-cluster/m-p/189222#M78150</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2018-05-11T04:20:25Z</dc:date>
    </item>
  </channel>
</rss>

