Support Questions
Find answers, ask questions, and share your expertise

Getting error when trying to Generate Missing Credentials

Explorer

When trying to Generate Missing Credentials in Cloudera Manager I'm getting an error.

 

I'm interfacing with Active Directory.

 

It seems to me that there is a bug in the /usr/share/cmf/gen_credentials_ad.sh script.  In the Security section Cloudera Manager reports that the status is "Successfully Enabled Kerberos" so it seems I'm connecting to the Domain/KDC just fine.

 

Anybody have these troubles before?  I'm using Cloudera Manager 5.8.2.  Red Hat 7.2.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Explorer

OK.  I switched back to the original script and put the default for the Account Properties.  I was able to regenerate no problem.  The encryption types is not checked.  Perhaps that was the problem then.  Haven't heard back yet about AD version(s).

View solution in original post

7 REPLIES 7

Explorer

Found a fix, albeit a non-optimal one.

 

In the script gen_credentials_ad.sh I hard-coded the AD account properties

 

set -e
if [ "$SET_ENCRYPTION_TYPES" = "true" ]; then
ldapmodify -vH "$AD_SERVER" $SIMPLE_PWD_STR <<-%EOF
dn: $DIST_NAME
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
distinguishedName: $DIST_NAME
sAMAccountName: $USER
servicePrincipalName: $(echo $PRINC | sed -e "s/\@$CMF_REALM//g")
userPrincipalName: $PRINC
unicodePwd:: `echo -n "\"$PASSWD\"" | iconv -f UTF8 -t UTF16LE| base64 -w 0`
accountExpires: $ACCOUNTEXPIRES
userAccountControl: $USERACCOUNTCONTROL
%EOF

It would be nice for the script to be fixed by Cloudera.

Super Guru

Hello Joe,

 

I didn't have a chance to reply to your original post, but that AD error was a bit unclear anyway. 

What did you end up identifying as the cause and what solution, exactly, did you implement?

 

It appears you removed the msds-supportedEncryptionTypes attribute.  

 

If so, what version of Windows/AD are you using?  We have added that code in Cloudera Manager 5.8.0 so that, if desired, Cloudera Manager will create the principal objects in Active Directory along with support for AES128 and AES256 encryption types.  You can opt out of this by making sure that Active Directory Set Encryption Types is set to the default of false in Administration --> Settings --> Kerberos

 

This is off by default, so it must have been checked at some point.  If false, the msds-supportedEncryptionTypes is not set.

 

Another question is why your Active Directory schema does not support that attribute.

 

Regards,

 

Ben

Explorer

As I recollect the msds-supportedEncryptionTypes was not the problem.  I did have the Active Directory Set Encryption Types checked however.  I went ahead and unchecked it.

 

I could be wrong, but the issue seems to be that in the original script the snippet

ldapmodify -H "$AD_SERVER" $SIMPLE_PWD_STR <<-%EOF
dn: $DIST_NAME
changetype: add
$(echo "$OBJECTCLASSES" | sed '/str/d')
distinguishedName: $DIST_NAME
....

the $OBJECTCLASSES comma delimited string isn't being handled correctly.  Once I hardcoded it, it worked fine.

 

I'm trying to get answer about the AD version.  I'm having to work through these issues with my IT department.

 

Is there a way to reinitalize things to regenerate the credentials again?  I'd be happy to help try to debug the original gen_credentials_ad.sh script.

 

Super Guru

Very interesting.  I see that the output you have only has objectClass=top when the default is:

Active Directory Account Properties

accountExpires=0,objectClass=top,objectClass=person,objectClass=organizationalPerson,objectClass=user

 

If you have a little blue arrow near the "Active Directory Account Properties" configuration in the Kerberos Settings, click that to return to the default.

 

That said, you can regenerate credentials by shutting down your cluster and then checking all principals and clicking the Regenerate Selected button.  If you don't have Active Directory Delete Accounts on Credential Regeneration checked in your Kerberos Settings, you'll need to manually delete the principal objects from AD first.

 

I don't think this is an outright bug, but it would be nice to know what is going on with the objectclasses list.

 

 

Explorer

OK.  I switched back to the original script and put the default for the Account Properties.  I was able to regenerate no problem.  The encryption types is not checked.  Perhaps that was the problem then.  Haven't heard back yet about AD version(s).

View solution in original post

New Contributor

Hello

I'm having this same issue... I think

see I'm using active directory... and I'm using the encryption type:  aes256-cts-hmac-sha1-96

only... I'm running kinit on the server and everything looks to be good... then I try to generate the missing credentials which are all of then but I'm getting this:

 

Kerberos encryption types configuration is invalid or missing. 

as I said the encryption type is indeed set up, I also checked the file krbg5.conf and everythig looks good, in the AD I'm forcing the AES types within a policy.

my guess is that the encryption type is wrong... but I'm really lost .

any ideas?

 

thanks!!

New Contributor
well... I resolved this by adding :
-aes256-cts-hmac-sha1-96
-aes128-cts
only those 2...
hope this help!