configuration - OpenLDAP 配置错误 ldap_bind : Invalid credentials (49)

标签 configuration syntax-error ubuntu-10.04 openldap

我正在使用 Ubuntu 10.4 服务器,并且正在尝试将 OpenLDAP 配置为 SVN 和其他服务的身份验证协议(protocol)。但是我完全不明白 ldap 是如何工作的,在设置了一个示例配置后,我试图填充它但没有成功。这是错误:

ldap_bind: Invalid credentials (49)

这似乎是示例配置问题,更准确地说是管理员配置。但是我尝试使用加密密码更改它,但没有得到任何结果。代码配置如下
    # Load modules for database type
    dn: cn=module,cn=config
    objectclass: olcModuleList
    cn: module
    olcModuleLoad: back_bdb.la

    # Create directory database
    dn: olcDatabase=bdb,cn=config
    objectClass: olcDatabaseConfig
    objectClass: olcBdbConfig
    olcDatabase: bdb

   # Domain name (e.g. home.local)
   olcSuffix: dc=home,dc=local

   # Location on system where database is stored
   olcDbDirectory: /var/lib/ldap

   # Manager of the database
   olcRootDN: cn=admin,dc=home,dc=local
   olcRootPW: admin

   # Indices in database to speed up searches
   olcDbIndex: uid pres,eq
   olcDbIndex: cn,sn,mail pres,eq,approx,sub
   olcDbIndex: objectClass eq

   # Allow users to change their own password
   # Allow anonymous to authenciate against the password
   # Allow admin to change anyone's password
   olcAccess: to attrs=userPassword
   by self write
   by anonymous auth
   by dn.base="cn=admin,dc=home,dc=local" write
   by * none

   # Allow users to change their own record
   # Allow anyone to read directory
   olcAccess: to *
   by self write
   by dn.base="cn=admin,dc=home,dc=local" write
   by * read

最佳答案

您是否尝试过通过 CLI 连接?

ldapsearch -x -D "cn=admin,dc=home,dc=local" -W -h <hostname>

请检查您的系统日志,默认情况下 slapd 会在此处记录其输出。

您还可以使用必须在本地执行的 slapcat 来了解您的数据库是否已创建(否则,无论如何,slapd 都会中断)。它将输出第一个可用的数据库。使用标志 -n 提取特定数据库:
slapcat -n <database number>

我敢打赌,您正在针对错误的数据库进行身份验证。

关于configuration - OpenLDAP 配置错误 ldap_bind : Invalid credentials (49),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3726850/

相关文章:

url - 通过URL运行自动化脚本

java - @SpringApplicationConfiguration 和@ContextConfiguration 的区别

.net - 通过合并两个配置文件来创建 System.Configuration.Configuration?

javascript - “Uncaught SyntaxError: Unexpected token <”(等等,还有更多!)

python - "SyntaxError: Generator expression must be parenthesized"尝试使用 conda 时

javascript - 带有粒子的D3.js Sankey图

emacs - 让 .emacs.d 的行为就像 .d 文件夹一样

c - opencv Resize()问题

logging - 启用 Upstart 日志输出

ubuntu - 如何在 Cyber​​Duck 中通过 SFTP 使用 sudo?