ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Dmitry <tssb@mail.ru>
To: Sysadmins@lists.altlinux.org
Subject: [Sysadmins] OpenLDAP vs BIND
Date: Sat, 15 Mar 2008 23:46:54 +0300
Message-ID: <47DC35BE.9040805@mail.ru> (raw)

Здравствуйте.

Имеется ALTS4.0.1 с настроенной авторизацией пользователей через ldap.
Установил на этот сервер bind, и сразу же при загрузке системы
получил задержку ~2 минуты.
В логе обнаружил сообщение следующего содержания:

named[4758]: nss_ldap: failed to bind to LDAP server ldap://127.0.0.1: 
Can't contact LDAP server
named[4758]: nss_ldap: could not search LDAP server - Server is unavailable
Т.е. LDAP-сервер недоступен, так как он стартует позже BIND.

Сразу же возник вопрос: как bind связан с ldap?
Ответ: сам named никак не связан с ldap, но он запускается от имени 
пользователя named.named.

Однако, согласно nsswitch.conf...

-------------nsswitch.conf-------------
passwd:     files ldap nisplus nis
group:      files ldap nisplus nis
shadow:     tcb files ldap nisplus nis
---------------------------------------

...до ldap не должно доходить, так как named - локальный пользователь,
принадлежащий локальной группе named.
------------------------------------------------
[root@linux log]# cat /etc/group | grep named
named:x:25:
------------------------------------------------
И действительно, после корректировки строки в nsswitch.conf...

-------------nsswitch.conf-------------
group:      files nisplus nis
-------------nsswitch.conf-------------

...запуск BIND при загрузке произошел без задержек и ошибок логе.

То, что группа named - локальная подтвердила команда id...
--------------------------------------------
uid=25(named) gid=25(named) groups=25(named)
--------------------------------------------
которая успешно отработала.

Но такая конфигурация nsswitch.conf меня не устраивает -
не работает отображение групп в LDAP.
Поэтому пришлось вернуть строку
-------------nsswitch.conf-------------
group:      files ldap nisplus nis
---------------------------------------
Попытка ограничить работу libnss_ldap с помощью модификатора 
[SUCCESS=return] не дала результата...
-------------nsswitch.conf--------------------------
group:      files [SUCCESS=return] ldap nisplus nis
----------------------------------------------------
... при загрузке при запуске BIND вернулись тормоза и жалоба на
недоступность ldap-сервера в логе.

Поиск в google дал ссылку на дискуссию о похожем баге в Debian
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=375077

В bugillа нашел
https://bugzilla.altlinux.org/show_bug.cgi?id=12400
https://bugzilla.altlinux.org/show_bug.cgi?id=8986

Решение, которое здесь предлагается - добавить
bind_policy soft в nss_ldap.conf.
Безусловно, это помогло - тормозов при загрузке не стало,
но осталось сообщение об ошибке в логе, так как обращение
к LDAP-серверу при запуске осталось в libnss_ldap.

Вопрос: почему происходит обращение к LDAP-серверу за именем
группы (лог openldap это подтверждает), когда она присутствует
в файле /etc/group?
Если это ошибка, то это ошибка самого nss-фрейма или libnss_files,
а не ошибка nss_ldap. Как следствие, замена nss_ldap на nss-ldapd
проблему не решает.

Спасибо.

С наилучшими пожеланиями,
			Дмитрий

PS. В PAM сначала pam_tcb, а потом - pam_ldap.












                 reply	other threads:[~2008-03-15 20:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47DC35BE.9040805@mail.ru \
    --to=tssb@mail.ru \
    --cc=Sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git