From e4bddd46c35fe11131adec061e495a39760c6ac9 Mon Sep 17 00:00:00 2001 From: Bill Glick Date: Tue, 17 Dec 2024 10:10:52 -0600 Subject: [PATCH] Change kerberos create host logic to match new ad create host logic --- files/root/createhostkeytab.sh | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 files/root/createhostkeytab.sh diff --git a/files/root/createhostkeytab.sh b/files/root/createhostkeytab.sh deleted file mode 100644 index dc7ffa5..0000000 --- a/files/root/createhostkeytab.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/bash - -set -e - -RANDSTRING=`head -c 16 /dev/random | base64 | grep -o . | sort -R | tr -d "\n" | head -c 14` -REQCLASS1=`date | base64 | tr -dc A-Z | grep -o . | sort -R | tr -d "\n" | head -c2` -REQCLASS2=`date | base64 | tr -dc a-z | grep -o . | sort -R | tr -d "\n" | head -c2` -REQCLASS3=`date | tr -dc 0-9 | grep -o . | sort -R | tr -d "\n" | head -c2` -REQCHARS=`echo $REQCLASS1$REQCLASS2$REQCLASS3` -TEMPPASS=`echo "$RANDSTRING$REQCHARS" | grep -o . | sort -R | tr -d "\n"` - -echo "$1" | base64 --decode > /root/createhost.keytab - -echo -e "$TEMPPASS\n$TEMPPASS" | kadmin -kt /root/createhost.keytab -p $2/createhost@NCSA.EDU -q "addprinc host/$(hostname -f)@NCSA.EDU" -echo -e "$TEMPPASS" | kadmin -p host/$(hostname -f)@NCSA.EDU -q "ktadd host/$(hostname -f)@NCSA.EDU" -rm -f /root/createhost.keytab