LDAP Client: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „= Client = = Benötigte Pakete = == Debian == * '''apt install nslcd ldap-utils''' == Arch == * '''pacman -S nss-pam-ldapd''' = Konfiguration =“)
 
 
(11 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
[[Kategorie:LDAP]]
 +
[[Kategorie:PAM]]
 
= Client =
 
= Client =
  
Zeile 12: Zeile 14:
  
 
= Konfiguration =
 
= Konfiguration =
 +
 +
== NSS ==
 +
* Für LDAP
 +
* '''vim /etc/nslcd.conf'''
 +
 +
uid nslcd
 +
gid nslcd
 +
uri ldap://ldap.lab1''xx''.it # ldap://ldap.lab101.it
 +
base dc=lab1''xx'',dc=it
 +
# base dc=lab101,dc=it
 +
tls_cacertfile /etc/ssl/certs/ca-certificates.crt
 +
 +
* '''systemctl restart nslcd'''
 +
* Für lokalen Cache
 +
* '''vim /etc/nsswitch.conf'''
 +
 +
# /etc/nsswitch.conf
 +
#
 +
# Example configuration of GNU Name Service Switch functionality.
 +
# If you have the `glibc-doc-reference' and `info' packages installed, try:
 +
# `info libc "Name Service Switch"' for information about this file.
 +
 +
passwd:        files systemd ldap
 +
group:          files systemd ldap
 +
shadow:        files ldap
 +
 +
* '''systemctl restart nscd'''
 +
 +
== [[Pam|PAM]] ==
 +
 +
=== Debian ===
 +
* Unter Debian sollte die Standardeinstellung nach der Installation von ''libpam-ldap'' für das reine Anmelden funktionieren
 +
* Falls eine Funktionalität nicht existiert kann man Einstellungen von Arch auch übernehmen
 +
* Die genauen Dateipfade können aber abweichen
 +
* automatische Heimatverzeichnisse können mit dem Modul ''pam_mkhomedir.so'' erstellt werden
 +
* '''vim /etc/pam.d/login'''
 +
...
 +
session    required  pam_mkhomedir.so skel=/etc/skel umask=0077
 +
...
 +
 +
=== Arch ===
 +
 +
* Unter Arch sollten die Dateien ''system-auth'', ''su'', ''su-l'' und ''passwd'' im Ordner ''/etc/pam.d'' bearbeitet werden
 +
* Die Faustregel ist ''sufficient pam_ldap.so'' überall voranzustellen, wo ''required pam_unix.so'' steht
 +
* Die genaue Konfiguration kann unter https://wiki.archlinux.org/title/LDAP_authentication#PAM_Configuration nachgelesen werden
 +
 +
= Quellen =
 +
 +
* https://wiki.archlinux.org/title/LDAP_authentication

Aktuelle Version vom 29. September 2024, 21:31 Uhr

Client

Benötigte Pakete

Debian

  • apt install nslcd ldap-utils

Arch

  • pacman -S nss-pam-ldapd

Konfiguration

NSS

  • Für LDAP
  • vim /etc/nslcd.conf
uid nslcd
gid nslcd
uri ldap://ldap.lab1xx.it # ldap://ldap.lab101.it
base dc=lab1xx,dc=it
# base dc=lab101,dc=it
tls_cacertfile /etc/ssl/certs/ca-certificates.crt
  • systemctl restart nslcd
  • Für lokalen Cache
  • vim /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files systemd ldap
group:          files systemd ldap
shadow:         files ldap
  • systemctl restart nscd

PAM

Debian

  • Unter Debian sollte die Standardeinstellung nach der Installation von libpam-ldap für das reine Anmelden funktionieren
  • Falls eine Funktionalität nicht existiert kann man Einstellungen von Arch auch übernehmen
  • Die genauen Dateipfade können aber abweichen
  • automatische Heimatverzeichnisse können mit dem Modul pam_mkhomedir.so erstellt werden
  • vim /etc/pam.d/login
...
session    required   pam_mkhomedir.so skel=/etc/skel umask=0077
...

Arch

Quellen