diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2020-02-21 04:31:11 -0600 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2020-02-21 04:31:11 -0600 |
commit | 876baeb4d455fb811897a00e31fb5231512becd6 (patch) | |
tree | ea4ece91613f7b84fcef0b72264a17c1fbefc45c /scripts/kerberos | |
parent | de098e1f22ae6cdde62aa9f6b75697852e872ced (diff) |
starting out nfs
Diffstat (limited to 'scripts/kerberos')
-rwxr-xr-x | scripts/kerberos | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/scripts/kerberos b/scripts/kerberos index 0fb455d..919ee7d 100755 --- a/scripts/kerberos +++ b/scripts/kerberos @@ -4,22 +4,19 @@ set -e ROOT_PASS=root KRB5_PASS=krb5 KRB5_ADMIN_PASS=pass +USER_PASS=tommie 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/ -scp configs/kerberos/kadm5.acl root@$IP:/etc/krb5kdc/ -scp configs/kerberos/interfaces root@$IP:/etc/network/ -scp configs/hosts root@$IP:/etc/ +scp configs/kerberos/krb5.conf root@192.168.122.100:/etc/ +scp configs/kerberos/kdc.conf root@192.168.122.100:/etc/krb5kdc/ +scp configs/kerberos/kadm5.acl root@192.168.122.100:/etc/krb5kdc/ lxc-attach -n kerberos -- bash -c 'echo -e "'$KRB5_PASS'\n'$KRB5_PASS'" | krb5_newrealm' lxc-attach -n kerberos -- bash -c 'echo -e "'$KRB5_ADMIN_PASS'\n'$KRB5_ADMIN_PASS'" | kadmin.local addprinc root/admin' -lxc-attach -n kerberos -- systemctl restart networking lxc-attach -n kerberos -- systemctl restart krb5-admin-server lxc-attach -n kerberos -- systemctl restart krb5-kdc + +lxc-attach --clear-env -n kerberos -- bash -c 'echo -e "'$KRB5_ADMIN_PASS'\n'$USER_PASS'\n'$USER_PASS'\n" | kadmin addprinc tom' |