check-sshd-ldap.sh: sssctl optional, direkte ldapsearch-Abfrage und sssd-Log; setup installiert sssd-tools
lint / shell (push) Failing after 17s
lint / python (push) Failing after 13s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jochen MehlichandClaude Sonnet 5.5 committed 2026-10-24 11:14:58 +02:00
1 parent 5179c41e1b
commit 282418ab91
2 files changed
+16 -2

No files matched your search

+15 -1
View File
@@ -28,7 +28,21 @@ check "SSH-Keys-Abfrage funktioniert (Aufruf)" sss_ssh_authorizedkeys "$USER_NA
echo
echo "── getent passwd $USER_NAME"; getent passwd "$USER_NAME" || true
echo "── id $USER_NAME"; id "$USER_NAME" 2>&1 || true
echo "── sssctl domain-status authentik"; sssctl domain-status authentik 2>&1 | head -n 15 || true
if command -v sssctl >/dev/null; then
echo "── sssctl domain-status authentik"; sssctl domain-status authentik 2>&1 | head -n 15 || true
else
echo "── sssctl fehlt (apt install sssd-tools)"
fi
# Direkte LDAP-Abfrage mit den Daten aus sssd.conf: trennt Outpost-/Bind-Probleme von SSSD-Problemen
conf() { awk -F' *= *' -v k="$1" '$1 == k { print $2; exit }' /etc/sssd/sssd.conf 2>/dev/null; }
if command -v ldapsearch >/dev/null && [[ -r /etc/sssd/sssd.conf ]]; then
echo "── ldapsearch (cn=$USER_NAME)"
LDAPTLS_CACERT="$(conf ldap_tls_cacert)" ldapsearch -LLL -H "$(conf ldap_uri)" -D "$(conf ldap_default_bind_dn)" \
-y <(printf %s "$(conf ldap_default_authtok)") -b "$(conf ldap_search_base)" \
"(cn=$USER_NAME)" dn cn memberOf homeDirectory 2>&1 | head -n 20 || true
fi
echo "── sssd-Log (letzte Zeilen)"; journalctl -u sssd -n 15 --no-pager 2>&1 | tail -n 15 || true
if [[ $fail -ne 0 ]]; then
echo
+1 -1
View File
@@ -79,7 +79,7 @@ DOCKER_GROUP="server_${SERVER}_docker_compose"
# ── Pakete ───────────────────────────────────────────────────────────────────
log "📦 Pakete installieren"
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
sssd sssd-ldap libnss-sss libpam-sss libsss-sudo openssh-server ldap-utils >/dev/null
sssd sssd-ldap libnss-sss libpam-sss libsss-sudo sssd-tools openssh-server ldap-utils >/dev/null
# ── CA ───────────────────────────────────────────────────────────────────────
TLS_CACERT_LINE="# ldap_tls_cacert: System-CA-Store"