load_lib "helpers.exp"

set timeout 10

exp_prog "setup" $kadmin_local "" 0 {
    "kadmin.local:" { send "ank -randkey changepw/kerberos\n" }
} {
    "created" {}
    "already exists" {}
} {
    "kadmin.local:" { 
	send "ktadd -k $env(KRB5_KTNAME) changepw/kerberos\n"
    }
} {
    -re "Entry for principal changepw/kerberos .* added to keytab" {
	send "quit\n"
    }
}
