Здравствуйте! У меня проблема nss_ldap не пойму в чем проблема, когда в /etc/nsswitch.conf изменяю на group: files ldap то после рестарта slapd появляется ошибка nss_ldap: could not search ldap server - server is unavailable.
Если указать:
group: files
passwd: files ldap
shadow: files ldap
то нормально система видит пользователей из ldap, а когда изменяю на group: files ldap появляется опять ошибка.
# cat /etc/rc.conf
hostname="dc.nox.local"
keymap="ru.koi8-r.kbd"
ifconfig_em0=" inet 192.168.1.20 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
sshd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
slapd_enable="YES"
slapd_flags='-h "ldapi:///var/run/openldap/ldapi/ ldap://127.0.0.1/"'
slapd_sockets="/var/run/openldap/ldapi"
# cat /etc/nsswitch.conf
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: release/9.1.0/etc/nsswitch.conf 224765 2011-08-10 20:52:02Z dougb $
#
group: files ldap
group_compat: nis
hosts: files dns
networks: files
passwd: files ldap
passwd_compat: nis
shadow: files ldap
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files
# cat /usr/local/etc/nss_ldap.conf:
host 127.0.0.1
base dc=nox,dc=local
ldap_version 3
port 389
scope one
timelimit 30
bind_timelimit 30
bind_policy soft
nss_connect_policy persist
idle_timelimit 3600
nss_paged_results yes
pagesize 1000
nss_base_passwd ou=users,dc=nox,dc=local?one
nss_base_shadow ou=users,dc=nox,dc=local?one
nss_base_group ou=groups,dc=nox,dc=local?one
nss_base_passwd ou=computers,dc=nox,dc=local?one
cat /usr/local/etc/openldap/slapd.conf:
nclude /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
include /usr/local/etc/openldap/schema/misc.schema
include /usr/local/etc/openldap/schema/nis.schema
include /usr/local/etc/openldap/schema/openldap.schema
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
modulepath /usr/local/libexec/openldap
moduleload back_bdb
access to attrs=userPassword
by self write
by anonymous auth
by * none
access to *
by self write
by anonymous read
by * none
#######################################################################
# BDB database definitions
#######################################################################
database bdb
suffix "dc=nox,dc=local"
rootdn "cn=root,dc=nox,dc=local"
rootpw {SSHA}Qur3dORI1yXtdOKHWc+zRD0hjxJeixru
directory /var/db/openldap-data
loglevel 256
index objectClass eq
index cn eq