From c1b96d798137f4fc06af6058bb53b88bebba8b7e Mon Sep 17 00:00:00 2001 From: ytshih Date: Tue, 29 Jul 2025 04:01:03 +0800 Subject: [PATCH] Fix: add nsswitch --- 61-hl-ldap-env.hook | 1 + PKGBUILD | 9 ++++++--- install.sh | 1 + nsswitch.conf | 20 ++++++++++++++++++++ 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 nsswitch.conf diff --git a/61-hl-ldap-env.hook b/61-hl-ldap-env.hook index 43df923..25fa709 100644 --- a/61-hl-ldap-env.hook +++ b/61-hl-ldap-env.hook @@ -6,6 +6,7 @@ Target = etc/openldap/ldap.conf Target = etc/pam.d/su Target = etc/pam.d/su-l Target = etc/pam.d/system-auth +Target = etc/nsswitch.conf [Action] Description = Override configuration files... diff --git a/PKGBUILD b/PKGBUILD index cadb160..5436aed 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Yi-Ting Shih pkgname=hl-ldap-env -pkgver=1.0.4 +pkgver=1.0.5 pkgrel=1 pkgdesc="LDAP and NFS environment for konchin.com homelab" arch=(any) @@ -19,6 +19,7 @@ source=( 'pam-su' 'pam-su-l' 'pam-system-auth' + 'nsswitch.conf' 'net-home.mount' 'sssd.conf' "60-$pkgname.preset" @@ -34,6 +35,7 @@ package() { 'pam-su' 'pam-su-l' 'pam-system-auth' + 'nsswitch.conf' ) for file in ${files_override[@]}; do install -Dm644 "$file" "$pkgdir/usr/lib/hl-ldap-env/$file" @@ -50,8 +52,9 @@ sha256sums=('62c71fb39d4163e813b1fbbb7594d388d8de20476e69d0822ffd7c3d537b22a5' 'c54ddb4dda93149811ccd8c29446ed9e3d75bb01a0e5ca3532b4b6bd1a6099fe' '4dc73ef7fd1640345f0b84191c18bf161f2a79b11c7309ac2f73952b22ddf737' '6fba778754a1e73eb038481e1e436bbdaa81d7cf4ed26d6763c1f9d2a3122f3a' + '1b75b025dcf45037939682f745083859bf359085e84113e11cbd78b0c2500cfc' '1c4a92b809339137fd478c628e4753b849f26059761b1e20377e24c2fb06a555' 'f239447e5107f6be09b709b5a33ad23b680bcaafe60162cea11a72e4fe20516d' '3724487a683b546485026de8bd5917cf4fbd779bc39930d86174e5a440f939b7' - '769a91a0afdf666837bac9744088d7550ca74ebe94619abd369f420222fa8616' - '3818c2f3b35b7715c25ce7348ff0dc22fad7bd1753a05c5e85561d551abdd021') + 'd9a02ca8c3164d7e697954272387246e8b39c29241fbe120500bcadf52403f8f' + 'e39ac7db4d19d8072f7654d6bf871255418c112d4eee00be1f63c95b629616e7') diff --git a/install.sh b/install.sh index 08f11e1..61d3609 100644 --- a/install.sh +++ b/install.sh @@ -16,3 +16,4 @@ install_override "$pkglib/ldap.conf" '/etc/openldap/ldap.conf' install_override "$pkglib/pam-su" '/etc/pam.d/su' install_override "$pkglib/pam-su-l" '/etc/pam.d/su-l' install_override "$pkglib/pam-system-auth" '/etc/pam.d/system-auth' +install_override "$pkglib/nsswitch.conf" "/etc/nsswitch.conf" diff --git a/nsswitch.conf b/nsswitch.conf new file mode 100644 index 0000000..9acfcca --- /dev/null +++ b/nsswitch.conf @@ -0,0 +1,20 @@ +# Name Service Switch configuration file. +# See nsswitch.conf(5) for details. + +passwd: files sss +group: files [SUCCESS=merge] sss +shadow: files sss +gshadow: files sss +sudoers: files sss + +publickey: files + +hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns +networks: files + +protocols: files +services: files +ethers: files +rpc: files + +netgroup: files