Устанавливаем необходимые пакеты
apt-get update
apt-get install libnss-ldap
Отвечаем на вопросы
* LDAP server Uniform Resource Identifire: ldapi:///
* Distinguished name of the search base: dc=drivesource,dc=ru
* LDAP version to use: 3
* Make local root Database admin: Нет
* Does the LDAP database require login?: Нет
* Local crypt to use when changing passwords: exop
Если вы пропустили настройку во время установки - забейте, все равно проще ручками поправить конфиги!
Правим файл конфигурации **/etc/ldap.conf**
# Your LDAP server. Must be resolvable without using LDAP.
# Multiple hosts may be specified, each separated by a
# space. How long nss_ldap takes to failover depends on
# whether your LDAP client library supports configurable
# network or connect timeouts (see bind_timelimit).
host 127.0.0.1
# The distinguished name of the search base.
base dc=drivesource,dc=ru
# The LDAP version to use (defaults to 3
# if supported by client library)
ldap_version 3
# Reconnect policy: hard (default) will retry connecting to
# the software with exponential backoff, soft will fail
# immediately.
bind_policy soft
# Filter to AND with uid=%s
#pam_filter objectclass=account
pam_filter objectClass=posixAccount
# The user ID attribute (defaults to uid)
pam_login_attribute uid
# Group member attribute
pam_member_attribute memberUid
# Do not hash the password at all; presume
# the directory server will do it, if
# necessary. This is the default.
pam_password exop
# RFC2307bis naming contexts
# Syntax:
# nss_base_XXX base?scope?filter
# where scope is {base,one,sub}
# and filter is a filter to be &'d with the
# default filter.
# You can omit the suffix eg:
# nss_base_passwd ou=People,
# to append the default base DN but this
# may incur a small performance impact.
nss_base_passwd ou=Users,dc=drivesource,dc=ru?one
nss_base_shadow ou=Users,dc=drivesource,dc=ru?one
nss_base_group ou=Groups,dc=drivesource,dc=ru?one
Правим файл конфигурации **/etc/nsswitch.conf**
passwd: compat ldap
group: compat ldap
shadow: compat ldap