Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / DB2 LDAP plugin / 14 сообщений из 14, страница 1 из 1
04.05.2007, 03:28
    #34503713
tomat
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
Здравствуйте!

Для того, чтобы DB2 брала пользователей из домена, а не из локальных групп,
скачал LDAP плагин.

Плагин ставил в соответствии с докой:

1. забросил файлы в требуемые каталоги:
.../sqllib/security32/plugin/server
.../sqllib/security32/plugin/client
.../sqllib/security32/plugin/group

2. в DB2 command line processor ввел след. комманды
UPDATE DBM CFG USING SRVCON_PW_PLUGIN IBMLDAPauthserver
UPDATE DBM CFG USING CLNT_PW_PLUGIN IBMLDAPauthclient
UPDATE DBM CFG USING GROUP_PLUGIN IBMLDAPgroups

После установки плагина db2 вообще отказывается запускаться:
>db2start
SQL1366N A security plug-in "IBMLDAPauthclient" processing error occurred on the client. Reason code ="7".


Note:
Код: plaintext
1.
2.
- DB2 стоит на Suse Linux 10
- Домен Windows AD
- на Linux можно заходить под пользователями домена (поднят winbind)

Подскажите, пожалуйста как можно исправить сложившуюся ситуацию ?
Если не исправить ошибку, то хотя бы как откатить данные изменения, чтобы вернуть db2 в рабочее состояние ?
Заранее, спасибо!
...
Рейтинг: 0 / 0
04.05.2007, 07:39
    #34503797
тлгдшлщм
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
Документацию читаем внимательно особенно про
db2set DB2LIBPATH=<path-to-ldap-libraries>
...
Рейтинг: 0 / 0
04.05.2007, 14:11
    #34505039
tomat
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
Уважаемый, тлгдшлщм !

Пытаюсь установить переменную окружения как Вы сказали:

db2set DB2LIBPATH="/home/db2inst1/sqllib/security32/plugin"

Выдает ошибку:
SQL1092N "IBMLDAPauthclient" does not have the authority to perform the requested command.

Note: Как выяснилось он на любое действие db2set пишет данную ошибку.

Подскажите, пожалуйста, как исправить ошибку?
...
Рейтинг: 0 / 0
04.05.2007, 15:29
    #34505422
Mark Barinstein
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
а из-под владельца инстанса если выдать db2set?
...
Рейтинг: 0 / 0
04.05.2007, 16:32
    #34505722
ggv
ggv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
Не, ну а что же вы ожидали?
Допустим, вы правильно отредактировали IBMLDAPSecurity.ini, ла еще и не забыли его положить в sqllib/cfg
А пользователей c привилегией SYSADM у вас есть в директории?
Группа SYSADM, которая сконфигурирована?

Если все верно - работает. Ну у меня же работает.
На той же сусятине.
...
Рейтинг: 0 / 0
04.05.2007, 16:33
    #34505725
ggv
ggv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
вы теперича ни инстанцию запустить, ни db2set, ничего не можете.
Если пользователей нет.
С другой стороны, завести их не сложно.
...
Рейтинг: 0 / 0
04.05.2007, 16:34
    #34505730
ggv
ggv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
db2diag.log содержит ругательства по плагину.
На всякий случай, когда будете выяснять, чего не так.
...
Рейтинг: 0 / 0
04.05.2007, 17:22
    #34505887
tomat
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
Уважаемый, ggv !
Спасибо, что отозвались!

IBMLDAPSecurity.ini кинуть в sqllib/cfg не забыли, а вот по поводу его правильной настройки не уверены.

в db2diag.log пишутся следующие сообщения:

Код: plaintext
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
2007-05-04-17.10.43.270933+240 I325220G329        LEVEL: Error
PID     : 19334                TID : 1171714784
FUNCTION: DB2 Common, Security, Users and Groups, secLogMessage, probe:20
DATA #1 : String, 115 bytes
db2ldapFindAttrib:
ldap_search_s failed rc=1 (Operations error)
filter=(&(objectClass=inetOrgPerson)(uid=db2inst1))

2007-05-04-17.10.43.271370+240 I325550G271        LEVEL: Error
PID     : 19334                TID : 1171714784
FUNCTION: DB2 Common, Security, Users and Groups, secLogMessage, probe:20
DATA #1 : String, 58 bytes
db2ldapFindAttrib: unexpected LDAP rc=1 (Operations error)

2007-05-04-17.10.43.271450+240 I325822G424        LEVEL: Error
PID     : 19334                TID : 1171714784
FUNCTION: DB2 Common, Security, Users and Groups, secLogMessage, probe:20
DATA #1 : String, 210 bytes
LDAP WhoAmI: can't determine LDAP user associated with
OS user 'db2inst1': LDAP error while searching for AuthID.
Userid attribute='uid'  AuthID attribute='uid'
user objectClass='inetOrgPerson'  user base DN=''

Скажите это все из-за Вами упомянутых пользователей? или мы действительно, что-то не так настроили?

Note: Из настроек IBMLDAPSecurity.ini поменяли лишь LDAP server (занесли туда IP адрес контроллера домена) .

Заранее спасибо!

Содержимое ini :


;----------------------------------------------------------------------
; Licensed Materials - Property of IBM
;
; Governed under the terms of the International
; License Agreement for Non-Warranted Sample Code.
;
; (C) COPYRIGHT International Business Machines Corp. 2006
; All Rights Reserved.
;
; US Government Users Restricted Rights - Use, duplication or
; disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
;----------------------------------------------------------------------
;
; Sample configuration file for the IBM DB2 LDAP Security Plugin
;
; The default name and location for this file is
; UNIX: INSTHOME/sqllib/cfg/IBMLDAPSecurity.ini
; Windows: %DB2PATH%\cfg\IBMLDAPSecurity.ini
; Optionally, the location of this file can be specified via the
; DB2LDAPSecurityConfig environment variable.
; On Windows systems, this variable should be set in the global
; system environment to ensure it is picked up by the DB2 service.
;
; A semicolon anywhere on a line begins a comment.
;----------------------------------------------------------------------


;----------------------------------------------------------------------
; SERVER RELATED VALUES
;----------------------------------------------------------------------

; LDAP_HOST
; Name of your LDAP server(s).
; This is a space separated list of LDAP server hostnames or IP
; addresses, with an option port number for each one:
; host1[:port] [host2:[port2] ... ]
; The default port number is 389, or 636 if SSL is enabled.
LDAP_HOST = 192.168.4.1

; ENABLE_SSL
; To enable SSL support, you must have the GSKit toolkit installed.
; Optional; defaults to false (no SSL).
;ENABLE_SSL = true

; SSL_KEYFILE and SSL_PW
; SSL keyring and keyring password
; A keyfile is only required if your LDAP server is using a
; certificate that isn't automatically trusted by your GSkit install.
;SSL_KEYFILE = /home/db2inst1/IBMLDAPSecurity.kdb
;SSL_PW = keyfile-password


;----------------------------------------------------------------------
; USER RELATED VALUES
;----------------------------------------------------------------------

; USER_OBJECTCLASS
; LDAP object class used for users
; Generally "inetOrgPerson" ("user" for MSAD)
USER_OBJECTCLASS = inetOrgPerson

; USER_BASEDN
; LDAP base DN to use when searching for users.
; This is optional. If not specified, user searches will
; start at the root of the LDAP directory. Some LDAP servers
; require that you specify a value for this parameter.
;USER_BASEDN = o=ibm

; USERID_ATTRIBUTE
; LDAP user attribute that represents the "userid"
; This attribute is combined with the USER_OBJECTCLASS and USER_BASEDN
; (if specified) to construct an LDAP search filter when a user issues
; a DB2 CONNECT statement with an unqualified userid.
; For example, using the default values in this configuration file,
; db2 connect to MYDB user bob using bobpass
; results in the following search filter:
; &(objectClass=inetOrgPerson)(uid=bob)
USERID_ATTRIBUTE = uid

; AUTHID_ATTRIBUTE
; LDAP user attribute that represents the DB2 "authorization ID"
; (typically this is the same as the USERID_ATTRIBUTE).
AUTHID_ATTRIBUTE = uid


;----------------------------------------------------------------------
; GROUP RELATED VALUES
;----------------------------------------------------------------------

; GROUP_OBJECTCLASS
; LDAP object class used for groups
; Generally "groupOfNames" or "groupOfUniqueNames" ("group" for MSAD)
GROUP_OBJECTCLASS = groupOfNames

; GROUP_BASEDN
; LDAP base DN to use when searching for groups
; This is optional. If not specified, group searches will
; start at the root of the LDAP directory. Some LDAP servers
; require that you specify a value for this parameter.
;GROUP_BASEDN = o=ibm

; GROUPNAME_ATTRIBUTE
; LDAP group attribute that represents the name of the group
GROUPNAME_ATTRIBUTE = cn

; GROUP_LOOKUP_METHOD
; Determines the method used to find the group memberships for a user.
; Possible values are:
; SEARCH_BY_DN - Search for groups that list the user as a member.
; Membership is indicated by the group attribute defined
; as GROUP_LOOKUP_ATTRIBUTE (typically "member" or
; "uniqueMember").
; USER_ATTRIBUTE - A user's groups are listed as attributes of the user
; object itself. Search for the user attribute defined
; as GROUP_LOOKUP_ATTRIBUTE to get the groups (typically
; "memberOf" for MSAD or "ibm-allGroups" for ITDS).
GROUP_LOOKUP_METHOD = SEARCH_BY_DN
;GROUP_LOOKUP_METHOD = USER_ATTRIBUTE

; GROUP_LOOKUP_ATTRIBUTE
; Name of the attribute used to determine group membership, as described
; above.
GROUP_LOOKUP_ATTRIBUTE = member
;GROUP_LOOKUP_ATTRIBUTE = ibm-allGroups

; NESTED_GROUPS
; If NESTED_GROUPS is true, we recursively search for group memberships by
; attempting to look up the group memberships for every group that we find.
; Cycles (A belongs to B, B belongs to A) are handled correctly.
; This is optional, and default to false.
;NESTED_GROUPS = true


;----------------------------------------------------------------------
; MISCELLANEOUS VALUES
;----------------------------------------------------------------------

; If your LDAP server does not support anonymous access, or if anonymous
; access is not sufficient when searching for users or groups, then you
; can define a DN and password that will be used to perform searches.
; Optional.
;SEARCH_DN = cn=root
;SEARCH_PW = rootpassword


; Dump some extra information to the db2diag.log to aid in debugging
; LDAP related issues. Most of the additional information will be
; logged at DIAGLEVEL 4 (INFO).
; Optional, defaults to false.
;DEBUG = true
...
Рейтинг: 0 / 0
07.05.2007, 08:40
    #34508445
ggv
ggv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
ну так сделайте ldapsearch с фильтром (&(objectClass=inetOrgPerson)(uid=db2inst1))
Если всё нормально - вернётся ровно один объект.
И группы не забудьте проверить.
Короче, контент директории создайте, если не создано.
А если создано - то выясняйте, почему плагин ничего не находит. И начните выяснять с простого ldapsearch, утилиты командной строки.

Вообще-то, я бы не использовал этот плагин, я, наверное, настроил бы аутентификацию через ос, вот она пусть в ldap и лазит. Настроить nsswitch.conf , pam_ldap, что там еще надо.
Преимущество то, что в nsswitch.conf можно задать поиск в более чем одной базе. То есть, если через ldap пользователя по каким-то причинам аутентифицировать не возможно, он будет аутентифицирован через другую базу, например, через старые добрые файлы. И ваш хозяин инстанции всегда сможет аутентифицироваться, если даже ваш ldap уничтожен ядерным взрывом.
По уму, плагин тоже надо бы делать так - если не удалось через ldap, аутентифицируем через ОС, по-старому.
...
Рейтинг: 0 / 0
08.05.2007, 17:09
    #34513483
fregat
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
Уважаемый, ggv !

Запустил ldapsearch с дебагом
Выдает:
ldap_create
ldap_pvt_sasl_getmech
ldap_search
put_filter: "(objectclass=*)"
put_filter: simple
put_simple_filter: "objectclass=*"
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP 192.168.4.1:389
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying 192.168.4.1:389
ldap_connect_timeout: fd: 3 tm: -1 async: 0
ldap_ndelay_on: 3
ldap_is_sock_ready: 3
ldap_ndelay_off: 3
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 64 bytes to sd 3
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: 192.168.4.1 port: 389 (default)
refcnt: 2 status: Connected
last used: Tue May 8 15:21:32 2007

** Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** Response Queue:
Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next: tag 0x30 len 96 contents:
ldap_read: message type search-entry msgid 1, original id 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: 192.168.4.1 port: 389 (default)
refcnt: 2 status: Connected
last used: Tue May 8 15:21:32 2007

** Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** Response Queue:
* msgid 1, type 100
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next: tag 0x30 len 16 contents:
ldap_read: message type search-result msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
read1msg: 0 new referrals
read1msg: mark request completed, id = 1
request 1 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
adding response id 1 type 101:
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (}) ber:
ldap_get_values
ber_scanf fmt ({x{{a) ber:
ber_scanf fmt ([v]) ber:
ldap_msgfree
ldap_sasl_interactive_bind_s: server supports: GSSAPI GSS-SPNEGO EXTERNAL DIGEST-MD5
ldap_int_sasl_bind: GSSAPI GSS-SPNEGO EXTERNAL DIGEST-MD5
ldap_int_sasl_open: host=kzta.local
SASL/EXTERNAL authentication started
ldap_perror
ldap_sasl_interactive_bind_s: Unknown authentication method (-6)
additional info: SASL(-4): no mechanism available:

Подскажите, пожалуйста, какой механизм он требует?
...
Рейтинг: 0 / 0
08.05.2007, 18:43
    #34513765
tomat
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
Уважаемый, ggv !

Выполнил запрос как Вы сказали:
ldapsearch -x "(&(objectClass=inetOrgPerson)(uid=db2inst1))"

Вывело:
# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: (&(objectClass=inetOrgPerson)(uid=db2inst1))
# requesting: ALL
#

# search result
search: 2
result: 1 Operations error
text: 00000000: LdapErr: DSID-0C0905FF, comment: In order to perform this ope
ration a successful bind must be completed on the connection., data 0, vece

# numResponses: 1

Вроде вернулся один объект, но какая-то ошибочка вдобавок! С чем это может быть связано?
...
Рейтинг: 0 / 0
08.05.2007, 19:44
    #34513858
tomat
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
to ggv !

ggv
Если все верно - работает. Ну у меня же работает.
На той же сусятине.
Вы говорите у Вас работает.
А у Вас, если не секрет, какая рабочая структура?
Что у Вас является сервером LDAP?
...
Рейтинг: 0 / 0
10.05.2007, 15:27
    #34516620
ggv
ggv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
1)какой механизм требует - не знаю. Я не специалист по sasl'aм
2) видимо, bind не прошел - ошибка bind это когда имя/пароль не верные.
3) у меня tivoli DS.
насколько я помню исходники плагина, там ничего зависимого небыло - должен с любым совместимым ldapv3 работатью
...
Рейтинг: 0 / 0
10.05.2007, 15:31
    #34516637
ggv
ggv
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
DB2 LDAP plugin
вот что должен примерно давать ldapsearch, если всё правильно

ggv@mars:~> ldapsearch -ssub "(&(objectClass=inetOrgPerson)(uid=vdb2in1))"
uid=vdb2in1,ou=people,o=softdesign,c=ru
objectclass=inetOrgPerson
objectclass=top
objectclass=person
objectclass=organizationalPerson
uid=vdb2in1
cn=instance owner
sn=owner
...
Рейтинг: 0 / 0
Форумы / IBM DB2, WebSphere, IMS, U2 [игнор отключен] [закрыт для гостей] / DB2 LDAP plugin / 14 сообщений из 14, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]