AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 29595
In Process
user3215
user3215
Asked: 2011-03-09 15:50:09 +0800 CST2011-03-09 15:50:09 +0800 CST 2011-03-09 15:50:09 +0800 CST

配置 OpenLDAP 时出现“ldap_add:命名冲突 (64)”错误

  • 772

我正在按照Ubuntu 服务器指南在 Ubuntu 10.04 服务器上配置 OpenLDAP,但无法使其正常工作。

当我尝试使用时sudo ldapadd -x -D cn=admin,dc=don,dc=com -W -f frontend.ldif,出现以下错误:

Enter LDAP Password: <entered 'secret' as password>
adding new entry "dc=don,dc=com"
ldap_add: Naming violation (64)
      additional info: value of single-valued naming attribute 'dc' conflicts with value present in entry

当我再次尝试做同样的事情时,我收到以下错误:

root@avy-desktop:/home/avy# sudo ldapadd -x -D cn=admin,dc=don,dc=com -W -f frontend.ldif
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

这是backend.ldif文件:

# Load dynamic backend modules
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb

# Database settings
dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=don,dc=com
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=don,dc=com
olcRootPW: secret
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
olcDbConfig: set_lk_max_locks 1500
olcDbConfig: set_lk_max_lockers 1500
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn="cn=admin,dc=don,dc=com" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to * by dn="cn=admin,dc=don,dc=com" write by * read

frontend.ldif文件:

# Create top-level object in domain
dn: dc=don,dc=com
objectClass: top
objectClass: dcObject
objectclass: organization
o: Example Organization
dc: Example
description: LDAP Example 

# Admin user.
dn: cn=admin,dc=don,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: secret

dn: ou=people,dc=don,dc=com
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=don,dc=com
objectClass: organizationalUnit
ou: groups

dn: uid=john,ou=people,dc=don,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: john
sn: Doe
givenName: John
cn: John Doe
displayName: John Doe
uidNumber: 1000
gidNumber: 10000
userPassword: password
gecos: John Doe
loginShell: /bin/bash
homeDirectory: /home/john
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 8
shadowMax: 999999
shadowLastChange: 10877
mail: [email protected]
postalCode: 31000
l: Toulouse
o: Example
mobile: +33 (0)6 xx xx xx xx
homePhone: +33 (0)5 xx xx xx xx
title: System Administrator
postalAddress:
initials: JD

dn: cn=example,ou=groups,dc=don,dc=com
objectClass: posixGroup
cn: example
gidNumber: 10000

谁能帮我?

10.04
  • 2 2 个回答
  • 14355 Views

2 个回答

  • Voted
  1. user3215
    2011-03-20T17:46:59+08:002011-03-20T17:46:59+08:00

    此链接帮助安装 LDAP 没有任何错误,并且只需要编辑起始行 2,3 和 4。刚刚使用 webmin 检查了 ldap 安装和配置

    • 2
  2. LGB
    2011-03-10T08:31:57+08:002011-03-10T08:31:57+08:00

    对我来说,你的 frontend.ldif 似乎是无效的,在dn声明的地方dn: dc=don,dc=com(所以 rdn 是dc=don),但你dc: Example稍后使用。我想你已经尝试过使用教程,但是你忘记修改你的 ldif 文件的某些部分,如果 dn 正确,你应该使用dc: don(与 dn 相同)。您还提到了 backend.ldif(这似乎是通过 slapd 的配置后端修改一些设置)和 frontend.ldif,但您只显示了您尝试从 frontend.ldif 而不是 backend.ldif 添加条目的示例。

    • 0

相关问题

  • 使用 dpkg 手动安装软件包是否会阻止未来的升级路径?

  • 如何完全删除 Ruby + Rails + Gems?

  • 从 8.04 LTS 升级到 10.04 LTS 的体验?

  • 删除在线状态菜单,但保留注销菜单?

  • 什么可能会阻止 xrandr 屏幕之间的鼠标移动?[关闭]

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    我需要什么命令来解压缩/提取 .tar.gz 文件?

    • 8 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Marko Smith

    如何使用命令行将用户添加为新的 sudoer?

    • 7 个回答
  • Marko Smith

    更改文件夹权限和所有权

    • 9 个回答
  • Martin Hope
    EmmyS 我需要什么命令来解压缩/提取 .tar.gz 文件? 2011-02-09 14:50:41 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve