祝大家有个愉快的一天。
我正在尝试在 OpenLDAP 中添加新架构。但出现错误:
ldap_add: Insufficient access (50)
root@ldap:/# ldapadd -c -x -D cn=admin,dc=domain,dc=com -W -f /tmp/test.d/cn\=config/cn\=schema/cn\=\{5\}microsoft.ldif
root@ldap:/# cat /tmp/test.d/cn\=config/cn\=schema/cn\=\{5\}microsoft.ldif
dn: cn=microsoft,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: microsoft
olcAttributeTypes: {0}( 1.2.840.113556.1.4.302 NAME 'sAMAccountType' DESC 'Fss
ssully qualified name of distinguished Java class or interface' SYNTAX 1.3.6.
1.4.1.1466.115.121.1.27 SINGLE-VALUE )
olcAttributeTypes: {1}( 1.2.840.113556.1.4.146 NAME 'objectSid' DESC 'Fssssull
y qualified name of distinguished Java class or interfaced' SYNTAX 1.3.6.1.4.
1.1466.115.121.1.40 SINGLE-VALUE )
olcAttributeTypes: {2}( 1.2.840.113556.1.4.221 NAME 'sAMAccountName' DESC 'Fds
sssully qualified name of distinguished Java class or interfaced' SYNTAX 1.3.
6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
olcAttributeTypes: {3}( 1.2.840.113556.1.4.1412 NAME 'primaryGroupToken' SYNTA
X 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
olcAttributeTypes: {4}( 1.2.840.113556.1.2.102 NAME 'memberOf' SYNTAX 1.3.6.1.
4.1.1466.115.121.1.12 SINGLE-VALUE )
olcAttributeTypes: {5}( 1.2.840.113556.1.4.98 NAME 'primaryGroupID' SYNTAX 1.3
.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
olcObjectClasses: {0}( 1.2.840.113556.1.5.6 NAME 'securityPrincipal' DESC 'Cso
ntainer for a Java object' SUP top AUXILIARY MUST ( objectSid $ sAMAccountNam
e ) MAY ( primaryGroupToken $ memberOf $ primaryGroupID ) )
我也尝试通过 phpldapadmin 添加模式,但出现同样的错误。
我使用的是从 slpad 安装开始就默认指定的管理员用户。我该如何为该用户添加权限?
最好的祝愿
答案1
cn=config 的默认访问配置仅允许通过外部身份验证。尝试:
ldapadd -c -Y EXTERNAL -H ldapi:/// -f '/tmp/test.d/cn=config/cn=schema/cn={5}microsoft.ldif'