diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2020-02-14 04:23:57 -0600 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2020-02-14 04:23:57 -0600 |
commit | 8ca998d9c27188e491761c3b99a222e842d6e44e (patch) | |
tree | 4f402bb5e4b7e13e373263f3c1a5d6671794893a /scripts/kerberos | |
parent | 814f256f9055fd4c90ef19ffbde3f852f2927939 (diff) |
krb5 server and client successfully starts
Diffstat (limited to 'scripts/kerberos')
-rwxr-xr-x | scripts/kerberos | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/kerberos b/scripts/kerberos new file mode 100755 index 0000000..8ecfde4 --- /dev/null +++ b/scripts/kerberos @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +ROOT_PASS=root +KRB5_PASS=krb5 + +scripts/debian_roll kerberos +lxc-attach -n kerberos -v DEBIAN_FRONTEND=noninteractive -- apt-get -y install krb5-admin-server + +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/ + +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 |