summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2020-02-14 07:50:37 -0600
committerTom Barrett <tom@tombarrett.xyz>2020-02-14 07:50:37 -0600
commitf76e2522464f2ddeb16aa01c9487b36e6aa70a94 (patch)
tree9b82f261d49743faf721363a7ec72ad572709a99 /scripts
parent8ca998d9c27188e491761c3b99a222e842d6e44e (diff)
adding admin users
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/kerberos6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/kerberos b/scripts/kerberos
index 8ecfde4..8948b22 100755
--- a/scripts/kerberos
+++ b/scripts/kerberos
@@ -3,6 +3,7 @@ set -e
ROOT_PASS=root
KRB5_PASS=krb5
+KRB5_ADMIN_PASS=pass
scripts/debian_roll kerberos
lxc-attach -n kerberos -v DEBIAN_FRONTEND=noninteractive -- apt-get -y install krb5-admin-server
@@ -12,8 +13,13 @@ IP="$(lxc-info -n kerberos | grep IP | tr -s ' ' | cut -d ' ' -f 2)"
sshpass -p $ROOT_PASS ssh-copy-id -o "StrictHostKeyChecking=no" root@$IP
scp configs/kerberos/krb5.conf root@$IP:/etc/
scp configs/kerberos/kdc.conf root@$IP:/etc/krb5kdc/
+scp configs/kerberos/kadm5.acl root@$IP:/etc/krb5kdc/
lxc-attach -n kerberos -- bash -c 'echo -e "'$KRB5_PASS'\n'$KRB5_PASS'" | krb5_newrealm'
lxc-attach -n kerberos -- systemctl restart krb5-admin-server
lxc-attach -n kerberos -- systemctl restart krb5-kdc
+
+lxc-attach -n kerberos -- bash -c 'echo -e "'$KRB5_ADMIN_PASS'\n'$KRB5_ADMIN_PASS'" | kadmin.local addprinc root/admin'
+
+# should be able to now use kadmin, but cannot ?