、パイプ、HDFSのkeytab同時に、あなたは私が作成した以下のスクリプトを実行することができます
#!/bin/bash
read -p "Please enter space-delimited list of ORGS to create: " NEW_ORGS
clear
#echo "################# CREATE KEYTABS ############################"
#echo ""
kdestroy
for i in $NEW_ORGS
do
printf "%b" "addent -password -p ${i} -k 1 -e aes256-cts-hmac-sha1-96\n${i}\nwrite_kt ${i}.keytab" | ktutil
printf "%b" "read_kt ${i}.keytab\nlist" | ktutil
done
echo ""
if [ ! -e /home/eip/.keytabs/hbase.keytab ]
then
printf "%b" "addent -password -p hbase -k 1 -e aes256-cts-hmac-sha1-96\nhbase\nwrite_kt hbase.keytab" | ktutil
printf "%b" "read_kt hbase.keytab\nlist" | ktutil
fi
exit 0
を