Support Questions

Find answers, ask questions, and share your expertise

kadmin: Cannot read password while initializing kadmin interface


from ambari-web "Admin->Kerberos->", when i click "Regenerate Keytabs" an error occured


One error is "/var/log/kadmin.log: don't have permission

Another is "kadmin:Can't read password while initalizing kadmin interface"


Super Mentor

@Elvis Zhang

1. Are you sure if ambari is running as root?

2. Can you please list the permission of file.

# ls -lart /var/log/kadmind.log

3. From ambari host the KDC is reachable or not?

# telnet  kdcHostName  kdcPort
# telnet 88



1. ambari is running as ambari


i think the reason is

"STDERR: kadmin: Cannot read password while initializing kadmin interface"

but when i run kadmin at another host(not kdc server) , i can connect the kdc server like this(input kadmin password) . they are all same with kdc's.

maybe the ambari-server read password from error config ??


@Elvis Zhang

I have seen this a few times, but assume it was related to load on the Ambari server host... maybe something related to open files or pipes.

Does this issue happen every time you attempt to Regenerate Keytab files?

What version of Ambari are you running? A retry loop was added in Ambari 2.5 to help things like this. So when that comes out, you should upgrade to that to see if it helps your issue.


yes, it happened every time when click 'Regenreate Keytab'.

the Ambari version is


Thanks @Jay SenSharma @Robert Levas ,i find the reason

when click Regenerate Keytab, a web page pop, Principle and password needed . but some time it pop up,some time nothing。i will find why .

Super Mentor

@Elvis Zhang

You can avoid Ambari UI to ask password for kadmin. You can store that kadmin credential to ambari store.

curl -H "X-Requested-By:ambari" -u admin:admin -X PUT -d '{ "Credential" : { "principal" : "admin/admin@EXAMPLE.COM", "key" : "pwd$hwx", "type" : "persisted" } }'


Above will require a keystore setup and then "[2] Encrypt passwords stored in file." on ambari-server setup-security wizard. Using this way you can avoid entering the kadmin credentials everytime on ambari.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.