diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2020-02-20 06:47:16 -0600 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2020-02-20 06:47:16 -0600 |
commit | de098e1f22ae6cdde62aa9f6b75697852e872ced (patch) | |
tree | 12f0058d0262d7ceea37978980582e7e8cfda039 | |
parent | 5b5ad1848dca6bfa7b14f639a29e7c3063bca63a (diff) |
can now use kadmin correctly
-rw-r--r-- | configs/hosts | 6 | ||||
-rw-r--r-- | configs/kerberos/interfaces | 14 | ||||
-rwxr-xr-x | destroy | 1 | ||||
-rwxr-xr-x | scripts/kerberos | 5 |
4 files changed, 24 insertions, 2 deletions
diff --git a/configs/hosts b/configs/hosts new file mode 100644 index 0000000..03fb37e --- /dev/null +++ b/configs/hosts @@ -0,0 +1,6 @@ +127.0.0.1 localhost +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters + +192.168.122.100 krb.hades.hr diff --git a/configs/kerberos/interfaces b/configs/kerberos/interfaces new file mode 100644 index 0000000..cf65d6a --- /dev/null +++ b/configs/kerberos/interfaces @@ -0,0 +1,14 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback + +auto eth0 +iface eth0 inet static + address 192.168.122.100/24 + post-up route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.122.1 + pre-down route del -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.122.1 + +source /etc/network/interfaces.d/*.cfg @@ -2,3 +2,4 @@ lxc-stop -n kerberos lxc-destroy -n kerberos +ssh-keygen -R "192.168.122.100" diff --git a/scripts/kerberos b/scripts/kerberos index f1e16ed..0fb455d 100755 --- a/scripts/kerberos +++ b/scripts/kerberos @@ -14,11 +14,12 @@ 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/ 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 - -# should be able to now use kadmin, but cannot ? |