gpt4 book ai didi

ldapadd : invalid format (line 1) entry: "" when adding a schema on systems including CentOS6

转载 作者:行者123 更新时间:2023-12-02 06:34:59 29 4
gpt4 key购买 nike

我正在尝试将架构 pwm.schema 添加到 ldap 并出现以下错误。

命令:

sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/pwm.schema

输出:

SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldapadd: invalid format (line 1) entry: ""

文件内容如下:

attributetype ( 1.3.6.1.4.1.591242.2.2010.04.16.1 NAME 'pwmEventLog'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )
attributetype ( 1.3.6.1.4.1.591242.2.2010.04.16.2 NAME 'pwmResponseSet'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )
attributetype ( 1.3.6.1.4.1.591242.2.2010.04.16.3 NAME 'pwmLastPwdUpdate'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.24 )
attributetype ( 1.3.6.1.4.1.591242.2.2010.04.16.4 NAME 'pwmGUID'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 )

objectclass ( 1.3.6.1.4.1.591242.1.2010.04.16.1 NAME 'pwmUser'
AUXILIARY
MAY ( dstPwdUpdate $ pwmEventLog $ pwmResponseSet $ pwmGUID
))

最佳答案

我遇到了这个问题,结果是 LDAP 在某个阶段收紧或更改了语法。

不幸的是,错误消息具有误导性。

您需要在attributetype 之后有一个冒号(:) 字符

例如:

attributetype ( 1.3.6.1.4.1.591242.2.2010.04.16.1 NAME 'pwmEventLog'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )

需要成为:

attributetype: ( 1.3.6.1.4.1.591242.2.2010.04.16.1 NAME 'pwmEventLog'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )

(等)

我现在刚刚在 CentOS 6 上测试了这个,我不得不更改一个在 CentOS5 上运行良好的文件。我不知道哪些其他发行版升级可能会受到影响。

关于ldapadd : invalid format (line 1) entry: "" when adding a schema on systems including CentOS6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22025462/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com