Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 02-01-2018 11:44 AM - edited 09-16-2022 05:48 AM
Can we use password and Keytab file for same user in Kerberos? Also, is password changed after creating keytab for that principal?
Created 02-01-2018 06:50 PM
@Bhushan Kandalkar, Yes we can use both password and keytab for the same principal. You will have to regenerate the keytab if you change the password.
Created 02-01-2018 06:50 PM
@Bhushan Kandalkar, Yes we can use both password and keytab for the same principal. You will have to regenerate the keytab if you change the password.
Created 02-02-2018 04:48 AM
I am getting error while using password for same principal. I have done following steps:
================================================
kadmin: addprinc [email protected]
WARNING: no policy specified for [email protected]; defaulting to no policy Enter password for principal "[email protected]":
Re-enter password for principal "[email protected]":
Principal "[email protected]" created.
kadmin: ktadd -k /home/testuser/testuser.keytab [email protected]
Entry for principal [email protected] with kvno 2, encryption type aes256-cts-hmac-sha1-96 added to keytab WRFILE:/home/testuser/testuser.keytab. Entry for principal [email protected] with kvno 2, encryption type aes128-cts-hmac-sha1-96 added to keytab WRFILE:/home/testuser/testuser.keytab. kadmin: quit
[root@bhushanhdp-1 ~]# chown -R testuser:testuser /home/testuser/testuser.keytab
[root@bhushanhdp-1 ~]# chmod 600 /home/testuser/testuser.keytab
[root@bhushanhdp-1 ~]# su - testuser
[testuser@bhushanhdp-1 ~]$ kinit -kt testuser.keytab [email protected]
[testuser@bhushanhdp-1 ~]$ hadoop fs -ls /
Found 9 items
drwxrwxrwx - yarn hadoop 0 2018-01-29 11:39 /app-logs
drwxr-xr-x - hdfs hdfs 0 2018-01-29 11:39 /apps
drwxr-xr-x - yarn hadoop 0 2018-01-29 11:37 /ats
drwxr-xr-x - hdfs hdfs 0 2018-01-29 11:37 /hdp
drwxr-xr-x - mapred hdfs 0 2018-01-29 11:37 /mapred
drwxrwxrwx - mapred hadoop 0 2018-01-29 11:38 /mr-history
drwxrwxrwx - hdfs hdfs 0 2018-01-31 09:27 /tmp
drwxr-xr-x - hdfs hdfs 0 2018-01-29 11:39 /user
drwxr-xr-x - hdfs hdfs 0 2018-01-29 11:37 /webhdfs
[testuser@bhushanhdp-1 ~]$ kdestroy
[testuser@bhushanhdp-1 ~]$ klist klist: No credentials cache found (filename: /tmp/krb5cc_1015)
[testuser@bhushanhdp-1 ~]$ kinit [email protected]
Password for [email protected]:
kinit: Password incorrect while getting initial credentials
[testuser@bhushanhdp-1 ~]$
======================================================================
Is password changed after creating Keytab file?
How should I used both password and Keytab for same principal?
Created 02-03-2018 01:20 AM
@Bhushan Kandalkar use below (which will not change the password while generating the keytab.
kadmin.local -q "xst -norandkey -k testuser.keytab testuser"
Created 02-07-2018 05:22 AM
Thanks @Sandeep Nemuri.