Created on 11-11-2014 08:58 AM - edited 09-16-2022 02:12 AM
Hi,
I was enabling kerberos from cloudera manager.
Everything worked fine but when it tried to do the step of "generating Credentials" it gave me an error.
Please find the error.
Any suggestions?
Waiting for the reply
/usr/share/cmf/bin/gen_credentials.sh failed with exit code 1 and output of << + export PATH=/usr/kerberos/bin:/usr/kerberos/sbin:/usr/lib/mit/sbin:/usr/sbin:/sbin:/usr/sbin:/bin:/usr/bin + PATH=/usr/kerberos/bin:/usr/kerberos/sbin:/usr/lib/mit/sbin:/usr/sbin:/sbin:/usr/sbin:/bin:/usr/bin + CMF_REALM=JNJ.COM + KEYTAB_OUT=/var/run/cloudera-scm-server/cmf7829892990940630057.keytab + PRINC=impala/[email protected] + MAX_RENEW_LIFE=432000 + KADMIN='kadmin -k -t /var/run/cloudera-scm-server/cmf4619059661181081787.keytab -p cloudera-scm/[email protected] -r JNJ.COM' + RENEW_ARG= + '[' 432000 -gt 0 ']' + RENEW_ARG='-maxrenewlife "432000 sec"' + kadmin -k -t /var/run/cloudera-scm-server/cmf4619059661181081787.keytab -p cloudera-scm/[email protected] -r JNJ.COM -q 'addprinc -maxrenewlife "432000 sec" -randkey impala/[email protected]' WARNING: no policy specified for impala/[email protected]; defaulting to no policy add_principal: Operation requires ``add'' privilege while creating "impala/[email protected]". + '[' 432000 -gt 0 ']' ++ kadmin -k -t /var/run/cloudera-scm-server/cmf4619059661181081787.keytab -p cloudera-scm/[email protected] -r JNJ.COM -q 'getprinc -terse impala/[email protected]' ++ tail -1 ++ cut -f 12 get_principal: Operation requires ``get'' privilege while retrieving "impala/[email protected]". + RENEW_LIFETIME='Authenticating as principal cloudera-scm/[email protected] with keytab /var/run/cloudera-scm-server/cmf4619059661181081787.keytab.' + '[' Authenticating as principal cloudera-scm/[email protected] with keytab /var/run/cloudera-scm-server/cmf4619059661181081787.keytab. -eq 0 ']' /usr/share/cmf/bin/gen_credentials.sh: line 28: [: too many arguments + kadmin -k -t /var/run/cloudera-scm-server/cmf4619059661181081787.keytab -p cloudera-scm/[email protected] -r JNJ.COM -q 'xst -k /var/run/cloudera-scm-server/cmf7829892990940630057.keytab impala/[email protected]' kadmin: Operation requires ``change-password'' privilege while changing impala/[email protected]'s key + chmod 600 /var/run/cloudera-scm-server/cmf7829892990940630057.keytab chmod: cannot access `/var/run/cloudera-scm-server/cmf7829892990940630057.keytab': No such file or directory
Created 11-11-2014 12:36 PM
You should not have to specifically add the CM principal, the */admin should handle it.
From what you pasted, I think you have a space missing between your COM and the "*" at the end of the first line; Mine looks like this:
[12:34 root@secsme-1 ~] > cat kadm5.acl
*/[email protected] *
Created 11-13-2014 09:43 AM
Just FYI, it should have a space
http://web.mit.edu/kerberos/krb5-devel/doc/admin/conf_files/kadm5_acl.html
Created 11-11-2014 11:09 AM
What version of Cloudera Manager are you using in the example you provided?
Created 11-11-2014 11:12 AM
the latest 5.2 version of cloudera is used
Created 11-11-2014 11:15 AM
What KDC is in use? What OS and Release Version is the KDC running on?
Created 11-11-2014 11:18 AM
Also, what is in your KDC's kadm5.acl file?
Created 11-11-2014 11:37 AM
Created 11-11-2014 12:07 PM
so realize the reason there was a */admin@REALM in the kadm5.acl file before you changed it... that generic entry was in there so that any principal that has a name that ends with /admin is granted administrative rights over the KDC database.
Your cloudera manager principal is named cloudera-scm/[email protected], but your acl file restricts admin to ONLY a user named "[email protected]"
From the script output you gave, none of the commands are working through kadmin becase the CM server user has no rights.
Either update the kadm5.acl file to include */admin@JNJ.COM, or explicitly set and entry for the CM server scm-server/admin@JNJ.COM. At that point you should be able to configure cluster principals through CM in the KDC.
Todd
Created 11-11-2014 12:15 PM
My kadm5.acl is like this :-
*/[email protected]*
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/var/kerberos/krb5kdc/kadm5.acl" 1L, 18C
So you are suggesting is to add cloudera-scm/[email protected] too right?
Created 11-11-2014 12:36 PM
You should not have to specifically add the CM principal, the */admin should handle it.
From what you pasted, I think you have a space missing between your COM and the "*" at the end of the first line; Mine looks like this:
[12:34 root@secsme-1 ~] > cat kadm5.acl
*/[email protected] *
Created 11-13-2014 09:40 AM
I was able to reolve it.
The space should not be there between COM and * in kadm5.acl
Thanks !! 🙂