LDAPデータベースにエントリを追加すると「slapadd:無効なオプション」が発生する

LDAPデータベースにエントリを追加すると「slapadd:無効なオプション」が発生する

私の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

おすすめ記事