![LDAP 데이터베이스에 항목을 추가할 때 "slapadd: 잘못된 옵션" 발생](https://linux55.com/image/77355/LDAP%20%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4%EC%97%90%20%ED%95%AD%EB%AA%A9%EC%9D%84%20%EC%B6%94%EA%B0%80%ED%95%A0%20%EB%95%8C%20%22slapadd%3A%20%EC%9E%98%EB%AA%BB%EB%90%9C%20%EC%98%B5%EC%85%98%22%20%EB%B0%9C%EC%83%9D.png)
내 LDAP 데이터베이스(CentOS 버전 5.11 - LDAP 버전 2.3.43-29.el5_11)에 초기 항목을 추가하려고 하는데 어떤 이유로 다음 오류가 발생합니다.
[root@centos openldap-servers-2.3.43]# slapadd -n 2 -1 /root/root.ldif
slapadd: invalid option -- 1
usage: slapadd [-v] [-d debuglevel] [-f configfile] [-F configdir] [-c]
[-g] [-n databasenumber | -b suffix]
[-l ldiffile] [-q] [-u] [-s] [-w]
루트 ldif 파일을 넣었고 /root/
아래 코드는 다음과 같습니다.
#root
dn: dc=server1,dc=com
dc: server1
objectClass: dcObject
obectClass: organizationalUnit
ou: server1.com
#staff
dn: ou=staff,dc=server1,dc=com
ou: staff
objectClass: organizationalUnit
~
다음은 slapd.conf의 일부이다.
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
# Load dynamic backend modules:
# modulepath /usr/lib/openldap
# Modules available in openldap-servers-overlays RPM package
# Module syncprov.la is now statically linked with slapd and there
# is no need to load it here
# moduleload accesslog.la
# moduleload auditlog.la
여기에 누락된 조언이 있나요?
답변1
-1
(ell) 플래그 대신 (one) 플래그를 사용한 것 같습니다 -l
. 두 플래그를 잘못 사용하기 쉽습니다! 이 시도:
slapadd -n 2 -l /root/root.ldif