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?