DB 스키마를 core.schema을 참조해서 만들고...
기본 스카마를 가지고 오는 core.schema를 # 처리하고..slapd를 실행시켰습니다.
[root@localhost ldap]# ./libexec/slapd ldap://203.2xx.1xx.250 etc/openldap/slapd.conf
이런 에러가 발생합니다.
/usr/local/ldap/etc/openldap/slapd.conf: line 61: index type "dc" undefined
core.shema 부분을 그냥 쓰면 실행이 된는데...제가 만든 스키마를 사용할 수가 없습니다.
그리고 OID를 임의의 숫자로 대체했는데...ㅜ.ㅜ
local.schema 만들었습니다..
#------------------------------------------------------
attributetype(2.5.4.41 NAME 'name'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{32768})
attributetype(2.5.4.4 NAME ('sn' 'surname')SUP name)
attributetype(2.5.4.3 NAME ('cn' 'commonName')SUP name)
attributetype(2.5.4.10 NAME('o' 'organizationName')SUP name)
attributetype(2.5.4.11 NAME('ou' 'organizationUnitName')SUP name)
attributetype(2.5.4.12 NAME 'title' SUB name)
attributetype(2.5.4.13 NAME 'description'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024})
attributetype(2.5.4.20 NAME 'telephoneNumber'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.50{32})
attributetype(2.5.4.35 NAME 'userPassword'
EQUALITY octetStringMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40{32})
attributetype(2.5.4.40 NAME 'objectClass'
EQUALITY objectIdentifierMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.38)
attributetype(0.9.2342.19200300.100.1.25 NAME ('dc' 'domainComponent')
DESC 'RFC1274/2247:domain component'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE)
#--------------------------------------------------------
objectclass(2.5.6.0 NAME 'top' ABSTRACT
MUST objectClass)
objectclass(1.3.6.1.41.1466.344 NAME 'dcobject'
DESC 'RFC2247: domain component objet'
SUP top AUXILIARY MUST dc)
MUST name)
objectclass(2.5.6.3 NAME 'organiation' SUP top STRUCTURAL
MUST o
MAY cn)
objectclass(2.5.6.4 NAME 'person' SUP top STRUCTURAL
MUST (cn $ sn)
MAY (userPassword $ telephoneNumber $ description))
objectclass(2.5.6.5 NAME 'file' SUP top STRUCTURAL
MUST cn)
objectclass(2.5.6.6 NAME 'title' SUP top STRUCTURAL
MUST cn
MAY title)
----------------------------------------------------------
그리고, slapd.conf 을 수정했습니다.
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.7 2001/09/27 20:00
t 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/schema/local.schema
# 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
1,1
database ldbm
suffix "dc=posdata,dc=com"
#suffix "o=My Organization Name,c=US"
rootdn "cn=manager,dc=posdata,dc=com"
#rootdn "cn=Manager,o=My Organization Name,c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw asdf
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory /usr/local/ldap/var/openldap-ldbm
# Indices to maintain
index objectClass dc,cn,sn
|