#!/bin/bash # LDAP-Server-Konfiguration LDAP_URI="ldap://192.168.174.101:7389" LDAP_BASE="dc=zell-aufmass,dc=de" LDAP_BINDDN="uid=Administrator,cn=users,dc=zell-aufmass,dc=de" LDAP_BINDPW="6%&6DdWMLzjS^i" # Installiere die benötigten Pakete für LDAP und nslcd echo "Installiere notwendige Pakete..." apt update apt install -y libnss-ldapd libpam-ldapd ldap-utils nslcd # Konfiguriere /etc/nsswitch.conf echo "Konfiguriere /etc/nsswitch.conf..." sed -i 's/^passwd:.*/passwd: compat ldap/' /etc/nsswitch.conf sed -i 's/^group:.*/group: compat ldap/' /etc/nsswitch.conf sed -i 's/^shadow:.*/shadow: compat ldap/' /etc/nsswitch.conf # Konfiguriere /etc/nslcd.conf echo "Konfiguriere /etc/nslcd.conf..." cat > /etc/nslcd.conf <