Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So I am trying to bind a linux machine to Open Directory. It works fine if I don't automate it.

[root@app-setup-testbox1 ~]# kadmin -p admin -w PASSWORD -q "addprinc -randkey host/$HOSTNAME"
Authenticating as principal admin with password.
WARNING: no policy specified for host/app-setup-testbox1.c45131.machinename.com@CS-DS1-1.HOME.DOMAIN.COM; defaulting to no policy
add_principal: Communication failure with server while creating "host/app-setup-testbox1.c45131.machinename.com@CS-DS1-1.HOME.DOMAIN.COM

If I take out the -randkey, I get a prompt for principal password and at that point, I can bind the machine.

But I want to use -randkey so I don't have to put a principal password.

I am doing this in a shell script.

So my question is why won't the -randkey option work?

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.