criecm.ldap_client

LDAP Client

UNIX accounts using LDAP (nslcd) (Debian, FreeBSD)

Variables (default values)

Required

  • ldap_base ('') Example: 'dc=univ,dc=fr'
  • ldap_uri ('') Example: 'ldaps://ldapr.univ.fr/ ldaps://ldap.univ.fr/'

Default Value Checks:

  • ldap_force_shell ('/usr/sbin/nologin') Leave it empty to allow shell access from LDAP, or set it to a different value. (The default is fine if you want accounts but don’t want users to log in)
  • ldap_binddn ('')
  • ldap_bindpw ('')
  • ldap_tls_cacert ('')
  • ldap_passwd_ou ('ou=People')
  • ldap_group_ou ('ou=Group')
  • ldap_passwd_filter ('(objectClass=posixAccount)')
  • ldap_authz_filter (ldap_passwd_filter)
  • ldap_group_filter ('(objectClass=posixGroup)')
  • ldap_min_uid (1000)
  • ldap_nss (true)
  • ldap_starttls (false)

Optional

  • pam_ldap_services ([]) - Only for FreeBSD - it does nothing if empty. You can include 'login', 'sshd', 'imap', etc., for the PAM services you need.
  • ldap_validnames ('') Check man nslcd.conf for details.
  • ldap_autofs (False) Allows automount for NSS configuration in nslcd.conf.

Example Playbook

  • For a login machine:
- hosts: mymachines
  roles:
    - criecm.ldap_client
  vars:
    ldap_base: dc=univ,dc=fr
    ldap_uri: 'ldaps://myldap.mydomain ldaps://myldapbackup.mydomain'

    x509_ca_path: /etc/ssl/myca.crt
    x509_ca_file: files/ca.crt
    ldap_tls_cacert: '{{x509_ca_path}}'
    ldap_tls_reqcert: 'demand'

    ldap_force_shell: /bin/bash
  • For a mail server:
- hosts: mailsrv
  roles:
    - criecm.ldap_client
    - mailserver role
  vars:
    ldap_base: dc=univ,dc=fr
    ldap_uri: 'ldaps://myldap.mydomain ldaps://myldapbackup.mydomain'

    x509_ca_path: /etc/ssl/myca.crt
    x509_ca_file: files/ca.crt
    ldap_tls_cacert: '{{x509_ca_path}}'
    ldap_tls_reqcert: 'demand'

    ldap_passwd_filter: ('(&(objectClass=inetMailRecipient)(mail=*@mydomain))')
    pam_ldap_services: [ dovecot, imap, submission ]
Informazioni sul progetto

ldap client (nss)

Installa
ansible-galaxy install criecm.ldap_client
Licenza
Unknown
Download
1.3k
Proprietario
Direction des Systèmes d'Information