[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: newbie problem w/ ldappadd
hi,
I modified slapd.conf as following
suffix "dc=mail,dc=hollybridge,dc=not"
rootdn "o=qmailusers,dc=mail,dc=hollybridge,dc=not"
i ever changed rootdn from "o=qmailusers,dc=mail,dc=hollybridge,dc=not" to "cn=qmailusers,dc=mail,dc=hollybridge,dc=not"
but it seems no difference. See following ldapadd command. The command must use cn=qmailusers options.
The ldif file is following
[root@mail bin]# more example.ldif
dn:dc=mail,dc=hollybridge,dc=not
objectClass: top
#objectClass: organization
objectClass: dcobject
dc: mail
dn: o=qmailusers,dc=mail,dc=hollybridge,dc=not
objectClass: top
objectClass: organization
#objectClass: person
o: qmailusers
#cn: yjl
#sn: yin
dn: cn=yjl,o=qmailusers,dc=mail,dc=hollybridge,dc=not
objectClass: top
objectClass: organization
objectClass: person
o: qmailusers
cn: yjl
sn: yin
dn: cn=yjp,o=qmailusers,dc=mail,dc=hollybridge,dc=not
objectClass: top
objectClass: organization
objectClass: person
o: qmailusers
cn: yjp
sn: yin
And then if rootdn "o=qmailusers,dc=mail,dc=hollybridge,dc=not" or "cn=qmailusers,dc=mail,dc=hollybridge,dc=not"
[root@mail bin]# ldapadd -x -D "o=qmailusers,dc=mail,dc=hollybridge,dc=not" -w s
ecret -f example.ldif -r -F -v
ldap_initialize( <DEFAULT> )
ldap_bind: Inappropriate authentication
(when i chage rootdn ,must i restart slapd? I have not restarted slapd this time)
or
[root@mail bin]# ldapadd -x -D "cn=qmailusers,dc=mail,dc=hollybridge,dc=not" -w
secret -f example.ldif -r -F -v
ldap_initialize( <DEFAULT> )
add objectclass:
top
dcobject
add dc:
mail
adding new entry "dc=mail,dc=hollybridge,dc=not "
ldap_add: Already exists
ldif_record() = 68
I what to look the entries in ldap,so i typed following command:
[root@mail bin]# ldapsearch
version: 2
#
# filter: (objectclass=*)
# requesting: ALL
#
# search result
search: 2
result: 32 No such object
# numResponses: 1
or
[root@mail bin]# ldapsearch -x -b '' -s base '(objectclass=*)'
version: 2
#
# filter: (objectclass=*)
# requesting: ALL
#
#
dn:
objectClass: top
objectClass: OpenLDAProotDSE
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
It seems i am not success !
why i must use cn=qmailusers,no o=qmailusers,where is wrong ? if the entry already exists, i have used -r -F options to force to update it.But it seems to no use.
Thanks for any good ideals.
qqj
>From: openldap <openldap@8848.net>
>To: "openldap-software@openldap.org" <openldap-software@OpenLDAP.org>
>Subject: newbie problem w/ ldappadd
>Date: Wed, 22 Aug 2001 17:45:45 +0800
>
> hi all,
>
> i'm attempting to learn about opeldap, in order to setup a qmail-ldap
> mailserver. i have slapd up and running, and i'm trying to add entries
>w/
> ldapadd. relevant postion of my slapd.conf:
>
> ---------------------------------------------------
>
> database ldbm
> suffix "dc=mail,dc=hollybridge,dc=not"
> rootdn "o=qmailusers,dc=mail,dc=hollybridge,dc=not"
>include /usr/local/openldap/etc/openldap/slapd.oc.conf
>include /usr/local/openldap/etc/openldap/slapd.at.conf
>
>include /usr/local/openldap/etc/openldap/schema/core.schema
>include /usr/local/openldap/etc/openldap/schema/corba.schema
>include /usr/local/openldap/etc/openldap/schema/cosine.schema
>include /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
>include /usr/local/openldap/etc/openldap/schema/java.schema
>include /usr/local/openldap/etc/openldap/schema/krb5-kdc.schema
>include /usr/local/openldap/etc/openldap/schema/misc.schema
>include /usr/local/openldap/etc/openldap/schema/nadf.schema
>include /usr/local/openldap/etc/openldap/schema/nis.schema
>include /usr/local/openldap/etc/openldap/schema/openldap.schema
>
>rootpw secret
>index objectClass eq
>
>
> ---------------------------------------------------
>
> i've got the following ldif:
>
> ---------------------------------------------------
>dn: o=qmailusers,dc=mail,dc=hollybridge,dc=not
>objectClass: top
>objectClass: organization
>objectClass: dcobject
>dc: mail
>#sn: hollybridge mail users
>#cn: qmailusers
>o: qmailusers
>
>dn: cn=yjl,o=qmailusers,dc=mail,dc=hollybridge,dc=not
>objectClass: top
>objectClass: organization
>objectClass: person
>o: qmailusers
>cn: yjl
>sn: yin
>
>
> ---------------------------------------------------
>
> and i'm trying to add it like so:
>[root@mail bin]# ldapadd -x -D
>"cn=qmailusers,dc=mail,dc=hollybridge,dc=not" -w secret -f example.ldif
>-v
>ldap_initialize( <DEFAULT> )
>add objectClass:
> top
> organization
> dcobject
>add dc:
> mail
>add o:
> qmailusers
>adding new entry "o=qmailusers,dc=mail,dc=hollybridge,dc=not "
>ldap_add: No such object
>
>ldif_record() = 32
>
>
>
>
> any ideas?
>
>
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp