diff options
author | Sam Chudnick <sam@chudnick.com> | 2022-05-21 14:33:52 -0400 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2022-05-21 14:33:52 -0400 |
commit | 37a376466c6fdc42bd7b8b86241d1fc1ce15389b (patch) | |
tree | 284ff86dc6f409cb08775d66579946a5dfa0d73f | |
parent | a520bf1bba2c6889c4473bc57354aab4e0f7b8ed (diff) |
Don't change DNS servers by default. Fixed issue with NFS setup.
-rwxr-xr-x | ipaconf | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | # configures a FreeIPA client system by: | 3 | # configures a FreeIPA client system by: |
4 | # enrolling in a FreeIPA domain (includes ldap,kerberos,ntp | 4 | # enrolling in a FreeIPA domain (includes ldap,kerberos,ntp) |
5 | # setting up FreeIPA server as an nss target | 5 | # setting up FreeIPA server as an nss target |
6 | # configuring as a kerberized NFSv4 client or server | 6 | # configuring as a kerberized NFSv4 client or server |
7 | # configuring for FreeIPA-managed automount | 7 | # configuring for FreeIPA-managed automount |
@@ -44,12 +44,12 @@ done | |||
44 | grep -q bullseye-backports /etc/apt/sources.list || echo "deb https://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list | 44 | grep -q bullseye-backports /etc/apt/sources.list || echo "deb https://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list |
45 | 45 | ||
46 | # Install required packages | 46 | # Install required packages |
47 | apt update | 47 | ping -q -c 1 9.9.9.9 2>/dev/null && apt update |
48 | apt install freeipa-client nfs-common autofs autofs-ldap -y | 48 | apt install freeipa-client nfs-common autofs autofs-ldap -y |
49 | [ $nfssrv -eq 1 ] && apt install nfs-kernel-server -y | 49 | [ $nfssrv -eq 1 ] && apt install nfs-kernel-server -y |
50 | 50 | ||
51 | # Change DNS | 51 | # Change DNS |
52 | echo "domain $ipadomain\nsearch $ipadomain\nnameserver $dnssrv" > /etc/resolv.conf | 52 | #echo "domain $ipadomain\nsearch $ipadomain\nnameserver $dnssrv" > /etc/resolv.conf |
53 | 53 | ||
54 | # Move chrony conf so IPA installer can configure its own | 54 | # Move chrony conf so IPA installer can configure its own |
55 | mv /etc/chrony/chrony.conf /etc/chrony/chrony.conf.ipabk | 55 | mv /etc/chrony/chrony.conf /etc/chrony/chrony.conf.ipabk |
@@ -95,10 +95,9 @@ chmod 600 /etc/autofs_ldap_auth.conf | |||
95 | systemctl restart autofs | 95 | systemctl restart autofs |
96 | 96 | ||
97 | # Configure NFS | 97 | # Configure NFS |
98 | sed -i "s/NEED_IDMAPD.*$/NEED_IDMAPD=yes" | 98 | sed -i "s/NEED_IDMAPD.*$/NEED_IDMAPD=yes/" /etc/default/nfs-common |
99 | sed -i "s/NEED_GSSD.*$/NEED_GSSD=yes" | 99 | sed -i "s/NEED_GSSD.*$/NEED_GSSD=yes/" /etc/default/nfs-common |
100 | [ $nfssrv -eq 1 ] && sed -i "s/NEED_SVCGSSD.*$/NEEDSVCGSSD=\"yes\"/" /etc/default/nfs-kernel-server | 100 | [ $nfssrv -eq 1 ] && sed -i "s/NEED_SVCGSSD.*$/NEEDSVCGSSD=\"yes\"/" /etc/default/nfs-kernel-server && systemctl restart nfs-kernel-server |
101 | systemctl restart nfs-kernel-server | ||
102 | 101 | ||
103 | # Manaul steps for NFS server | 102 | # Manaul steps for NFS server |
104 | ipasrv=$(grep "server =" /etc/ipa/default.conf | cut -d '=' -f 2 | tr -d ' ') | 103 | ipasrv=$(grep "server =" /etc/ipa/default.conf | cut -d '=' -f 2 | tr -d ' ') |