Кто ни будь разобрался с их взаимодействием?
Старая запись в pg_hba.conf не работает, а новая (из руководства) - тоже не работает!
Старая:
host all all 127.0.0.1/32 ldap "ldap://your.domain.com/dc=company,dc=com;cn=;,ou=employees ,dc=company,dc=com"
Новая:
host all all 127.0.0.1/32 ldap ldapserver=your.domain.com ldapprefix="cn=" ldapsuffix=",ou=employees,dc=company,dc=com"
postgresql-8.4 и LDAP (Кто с этим разобрался?)
Модераторы: SLEDopit, Модераторы разделов
-
Ленивая Бестолочь
- Бывший модератор
- Сообщения: 2760
- ОС: Debian; gentoo
Re: postgresql-8.4 и LDAP
включите логи в лдапе (loglevel = 255) и посмотрите - почему не работает.
Солнце садилось в море, а люди с неоконченным высшим образованием выбегали оттуда, думая, что море закипит.
-
dduh
- Сообщения: 386
Re: postgresql-8.4 и LDAP
До логов дело не доходит. При restart-е postgresql он пишет, что ошибка в файле конфигурации, и не принимает не старую строку не новую. Я так подумал, postgres установлен на lenny из backports, может он там собран без поддержки LDAP, может кто ставил из исходников и связка с LDAP работает?
Вот это из документации, может я что прозевал, ткните кто увидит:
19.3.7. LDAP authentication
This authentication method operates similarly to password except that it uses LDAP as the password verification method. LDAP is used only to validate the user name/password pairs. Therefore the user must already exist in the database before LDAP can be used for authentication.
The server will bind to the distinguished name constructed as prefix username suffix. Typically, the prefix parameter is used to specify cn=, or DOMAIN\ in an Active Directory environment. suffix is used to specify the remaining part of the DN in a non-Active Directory environment.
The following configuration options are supported for LDAP:
ldapserver
Name or IP of LDAP server to connect to.
ldapprefix
String to prepend to the username when forming the DN to bind as.
ldapsuffix
String to append to the username when forming the DN to bind as.
ldapport
Port number on LDAP server to connect to. If no port is specified, the default port in the LDAP library will be used.
ldaptls
Set to 1 to make the connection between PostgreSQL and the LDAP server use TLS encryption. Note that this only encrypts the traffic to the LDAP server — the connection to the client will still be unencrypted unless SSL is used.
Note: Since LDAP often uses commas and spaces to separate the different parts of a DN, it is often necessary to use double-quoted parameter values when configuring LDAP options, for example:
ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"
Вот это из документации, может я что прозевал, ткните кто увидит:
19.3.7. LDAP authentication
This authentication method operates similarly to password except that it uses LDAP as the password verification method. LDAP is used only to validate the user name/password pairs. Therefore the user must already exist in the database before LDAP can be used for authentication.
The server will bind to the distinguished name constructed as prefix username suffix. Typically, the prefix parameter is used to specify cn=, or DOMAIN\ in an Active Directory environment. suffix is used to specify the remaining part of the DN in a non-Active Directory environment.
The following configuration options are supported for LDAP:
ldapserver
Name or IP of LDAP server to connect to.
ldapprefix
String to prepend to the username when forming the DN to bind as.
ldapsuffix
String to append to the username when forming the DN to bind as.
ldapport
Port number on LDAP server to connect to. If no port is specified, the default port in the LDAP library will be used.
ldaptls
Set to 1 to make the connection between PostgreSQL and the LDAP server use TLS encryption. Note that this only encrypts the traffic to the LDAP server — the connection to the client will still be unencrypted unless SSL is used.
Note: Since LDAP often uses commas and spaces to separate the different parts of a DN, it is often necessary to use double-quoted parameter values when configuring LDAP options, for example:
ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"
-
Ленивая Бестолочь
- Бывший модератор
- Сообщения: 2760
- ОС: Debian; gentoo
Re: postgresql-8.4 и LDAP
а как ваша учетка в лдапе называется, которую вы хотите использовать?
приведите строку
ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"
в своем исполнении.
п.с. у меня именно с такой строкой postgres стартует.
postgresql-8.3 8.3.7-0lenny1
приведите строку
ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"
в своем исполнении.
п.с. у меня именно с такой строкой postgres стартует.
postgresql-8.3 8.3.7-0lenny1
Солнце садилось в море, а люди с неоконченным высшим образованием выбегали оттуда, думая, что море закипит.
-
dduh
- Сообщения: 386
Re: postgresql-8.4 и LDAP
Ленивая Бестолочь писал(а): ↑10.08.2009 19:50а как ваша учетка в лдапе называется, которую вы хотите использовать?
приведите строку
ldapserver=ldap.example.net ldapprefix="cn=" ldapsuffix=", dc=example, dc=net"
в своем исполнении.
п.с. у меня именно с такой строкой postgres стартует.
postgresql-8.3 8.3.7-0lenny1
В этом и дело, что в 8.3 проблем не было. Поспешил наверное на 8.4 перейти.
В 8.3 строка была такая:
host all all 127.0.0.1/32 ldap "ldap://127.0.0.1/dc=company,dc=com;cn=;,ou=users ,dc=company,dc=com"
-
dduh
- Сообщения: 386
