I am trying to create a keytab file when i build the image. Here is what I am running on one of our Red Hat boxes:
ktutil
ktutil: add_entry -password -p $user_id@DOMAIN.COM -k 1 -e aes256-cts
Password for $user_id@DOMAIN.COM:
ktutil: wkt $user_id.keytab
ktutil: quit
and it generates the keytab.
I am trying to do this on Docker and I am running:
RUN ktutil && echo "add_entry -password -p $user_id@DOMAIN.COM -k 1 -e aes256-cts" && echo "$user_pass" && echo "wkt $user_id.keytab" && echo "quit"
Its doing this:
Step 22/27 : RUN ktutil && echo "add_entry -password -p $user_id@DOMAIN.COM -k 1 -e aes256-cts" && echo "$user_pass" && echo "wkt $user_id.keytab" && echo "quit"
---> Running in b186efb561fc
ktutil: add_entry -password -p $user_id@DOMAIN.COM -k 1 -e aes256-cts
$user_pass
wkt $user_id.keytab
quit
So it runs the first command and then exits ktutil? How should i format the RUN command. Is there a trick to getting this to stay in ktutil?