I have a bash for create keytab file:
#!/bin/bash
user="username"
pass="password"
printf "%b" "add_entry -password -p [email protected] -k 1 -e aes128-cts-hmac-sha1-96n$passnadd_entry -password -p [email protected] -k 1 -e aes256-cts-hmac-sha1-96n$passnadd_entry -password -p [email protected] -k 1 -e arcfour-hmac-md5-expn$passnadd_entry -password -p [email protected] -k 1 -e des3-cbc-sha1n$passnadd_entry -password -p [email protected] -k 1 -e des-cbc-md5n$passnwrite_kt $user.keytab" | ktutil
but can not connect to ldap server with this error:
kinit: Preauthentication failed while getting initial credentials
when I use kinit -V $user it is okey and I try to create keytab from command line multi time but I get same error with keytab login