[root@deepway bin]# ldapadd -D "dc=my-domain, dc=com" << EOF
> dn: dc=my-domain,dc=com
> cn:my-domain
> objectclass:mynewobject
> EOF
adding new entry "dc=my-domain,dc=com"
ldap_add: Object class violation
additional info: attribute not allowed
위와 같이 했습니다. attribute not allowed 라고 나오는게 아무래도 objectclass
의 속성이 정의되지 않은 것 같은데요.. 어디서 해야하지요??
openLDAP 2.0.7 깔았구요..
slapd.conf 파일의 내용은 아래와 같습니다 .
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.4 2000/08/26 17:06:18 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /usr/local/LDAP/etc/openldap/schema/core.schema
include /usr/local/LDAP/etc/openldap/local.oc.conf
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /usr/local/LDAP/var/slapd.pid
argsfile /usr/local/LDAP/var/slapd.args
# Load dynamic backend modules:
# modulepath /usr/local/LDAP/libexec/openldap
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
#######################################################################
# ldbm database definitions
#######################################################################
database ldbm
suffix "dc=my-domain, dc=com"
#suffix "o=My Organization Name, c=US"
#suffix "c=kr"
rootdn "cn=Manager, dc=my-domain, dc=com"
#rootdn "cn=Manager, c=kr"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw secret
# The database directory MUST exist prior to running slapd AND
# should only be accessable by the slapd/tools. Mode 700 recommended.
directory /usr/local/LDAP/var/openldap-ldbm
# Indices to maintain
index objectClass,o,cn eq
#index { <attrlist> | default } [pres,eq,approx,sub,none]
#index o eq
#index cn eq
#index mail eq
제가 이것저것 삽질한다고 군더더기들이 많습니다..
아 그리고 include 되어있는 local.oc.conf 라는 파일은 제가 만든건데여..
역시 좀 봐주세요.
vi local.oc.conf
objectclass mynewobject
requires
cn
allows
mail,
telephone
뭐가뭔지 모르겠어요.. 엉엉..
그리고 박근오님이 추천해주신 문서보고 많은 도움을 받았습니다
|