summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2022-05-21 14:33:52 -0400
committerSam Chudnick <sam@chudnick.com>2022-05-21 14:33:52 -0400
commit37a376466c6fdc42bd7b8b86241d1fc1ce15389b (patch)
tree284ff86dc6f409cb08775d66579946a5dfa0d73f
parenta520bf1bba2c6889c4473bc57354aab4e0f7b8ed (diff)
Don't change DNS servers by default. Fixed issue with NFS setup.
-rwxr-xr-xipaconf13
1 files changed, 6 insertions, 7 deletions
diff --git a/ipaconf b/ipaconf
index 7d653d2..aeab5c8 100755
--- a/ipaconf
+++ b/ipaconf
@@ -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
44grep -q bullseye-backports /etc/apt/sources.list || echo "deb https://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list 44grep -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
47apt update 47ping -q -c 1 9.9.9.9 2>/dev/null && apt update
48apt install freeipa-client nfs-common autofs autofs-ldap -y 48apt 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
52echo "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
55mv /etc/chrony/chrony.conf /etc/chrony/chrony.conf.ipabk 55mv /etc/chrony/chrony.conf /etc/chrony/chrony.conf.ipabk
@@ -95,10 +95,9 @@ chmod 600 /etc/autofs_ldap_auth.conf
95systemctl restart autofs 95systemctl restart autofs
96 96
97# Configure NFS 97# Configure NFS
98sed -i "s/NEED_IDMAPD.*$/NEED_IDMAPD=yes" 98sed -i "s/NEED_IDMAPD.*$/NEED_IDMAPD=yes/" /etc/default/nfs-common
99sed -i "s/NEED_GSSD.*$/NEED_GSSD=yes" 99sed -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
101systemctl restart nfs-kernel-server
102 101
103# Manaul steps for NFS server 102# Manaul steps for NFS server
104ipasrv=$(grep "server =" /etc/ipa/default.conf | cut -d '=' -f 2 | tr -d ' ') 103ipasrv=$(grep "server =" /etc/ipa/default.conf | cut -d '=' -f 2 | tr -d ' ')