未在objectClasses中声明ApacheDS gidNumber

时间:2018-10-02 08:49:59

标签: ldap apacheds

我遵循有关如何在LDAP Apache Directory Studio中创建组和用户的教程。

我使用posixGroup创建一个组 创建用户inetOrgPerson,posixAccound,shadowAccount

但是,条目不包含gidNumber和uidNumber,因此无法添加。

如何为组添加gidNumber和为用户添加uid号?

如果尝试手动添加gidNumber,我不会得到它:

  

创建条目时出错    -[LDAP:错误代码65-OBJECT_CLASS_VIOLATION:MessageType失败:ADD_REQUES java.lang.Exception:[LDAP:错误代码65-   OBJECT_CLASS_VIOLATION:MessageType失败:ADD_REQUEST消息   编号:13       添加请求:输入       dn:cn = Vydaj,ou = Testgroups,dc = test,dc = com       objectClass:posixGroup       objectClass:顶部       gidNumber:1000       cn:Vydaj:ERR_277未在条目cn的objectClasses中声明的属性gidNumber cn = Vydaj,ou = Testgroups,test,dc = com]     在   org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.checkResponse(DirectoryApiConnectionWrapper.java:1418)     在   org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.access $ 11(DirectoryApiConnectionWrapper.java:1386)     在   org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper $ 6.run(DirectoryApiConnectionWrapper.java:1009)     在   org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.runAndMonitor(DirectoryApiConnectionWrapper.java:1312)     在   org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.checkConnectionAndRunAndMonitor(DirectoryApiConnectionWrapper.java:1256)     在   org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.createEntry(DirectoryApiConnectionWrapper.java:1031)     在   org.apache.directory.studio.ldapbrowser.core.jobs.CreateEntryRunnable.createEntry(CreateEntryRunnable.java:225)     在   org.apache.directory.studio.ldapbrowser.core.jobs.CreateEntryRunnable.run(CreateEntryRunnable.java:124)     在   org.apache.directory.studio.connection.ui.RunnableContextRunner $ 1.run(RunnableContextRunner.java:129)     在   org.eclipse.jface.operation.ModalContext $ ModalContextThread.run(ModalContext.java:119)

     

[LDAP:错误代码65-OBJECT_CLASS_VIOLATION:失败   MessageType:ADD_REQUEST消息ID:13       添加请求:输入       dn:cn = Vydaj,ou = Testgroups,dc = test,dc = com       objectClass:posixGroup       objectClass:顶部       gidNumber:1000       cn:Vydaj:ERR_277未在条目cn的objectClasses中声明属性gidNumber cn = Vydaj,ou = Testgroups,dc = test,dc = com]

1 个答案:

答案 0 :(得分:0)

您应该能够在Apache Directory Studio“创建对象”向导中编辑值-使用objectClass posixGroup创建对象时,应该有一个“整数编辑器”,您可以在其中键入组gidNumber。当创建一个以posixAccount作为objectClass的用户时,您将看到一个对话框,其中有几个用红色突出显示的属性。双击红色文本或红色文本旁边“值”列中的空白单元格,将允许您编辑该属性值。

您始终可以先创建一般用户或组 ,然后添加适当的POSIX objectClass和必需的属性。由于objectClass具有强制性属性,因此需要将其作为单个操作执行。一个使用inetOrgPerson用户帐户,将posixAccount添加为objectClass并添加POSIX属性(取决于您的模式定义是必需的v / s可选)的LDIF示例:

dn: cn=something,ou=someou,o=company
changetype: modify
add: objectClass
objectClass: posixAccount
-
add: uidNumber
uidNumber: 55555
-
add: gidNumber
gidNumber: 555
-
add: homeDirectory
homeDirectory: /home/userid
-
add: loginShell
loginShell: /bin/bash
-
add: gecos
gecos: UserDisplay Name
-
add: description
description: UserDisplay Name
-