Ambari - How to store KDC admin credential persisted and regenerate keytabs using API call


Step1:

ambari-server setup-security

and choose  [2] Encrypt passwords stored in ambari.properties file
and choose the password you want to set

Step2:

curl -H "X-Requested-By:ambari" -u admin:admin -X  POST -d '{ "Credential" : { "principal" : "admin@EXAMPLE.COM", "key" : "paswwd12345", "type" : "persisted" } }' http://ambari-node1.example.com:8080/api/v1/clusters/hdp_cluster1/credentials/kdc.admin.credential

--> update with your actual principal name and password.
--> update the admin id password for ambari.


Step3:

 curl -H "X-Requested-By:ambari" -u admin:admin -X PUT -d '{ "Clusters": { "security_type" : "KERBEROS" } }' http://ambari-node1.example.com:8080/api/v1/clusters/hdp_cluster1/?regenerate_keytabs=ALL

No comments:

Post a Comment

Boost Your Download Speed with lftp Segmentation

Looking for a faster way to download files via sftp to a Linux machine? Try using "lftp" instead. This tool offers segmented downl...

Other relevant topics