[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Ldap ad with invalid structural object class error ( Another error )
Chee Leong Dew wrote:
HI,
I have modified my ldif to :
------------------------------------------------
dn: cn=Manager, dc=CLIENT8, dc=MYTESQ, dc=COM
objectclass: dcObject
dc: CLIENT8.MYTESQ.COM
objectclass: organization
o: Example Company
------------------------------------------------
But, another error show :
------------------------------------------------
[root@client8 sbin]# ldapadd -x -D
"cn=Manager,dc=CLIENT8,dc=MYTESQ,dc=COM" -W -f add.ldif
Enter LDAP Password:
adding new entry "cn=Manager, dc=CLIENT8, dc=MYTESQ, dc=COM"
ldap_add: No such object
------------------------------------------------
Why ? And , how to make use of the default schema so that I don't have
any problem on adding in a new entry ? (maybe modify or delete later).
I just want to add some entries to LDAP db so that I can continue to my
research on JAAS.
There are at least three errors in your LDIF
1) the two objectclass values should come together
2) if you meant to add "dc=CLIENT8, dc=MYTESQ, dc=COM",
then the value of the "dc" attr should be "CLIENT8" instead
of "CLIENT8.MYTESQ.COM"; in fact "dc" stands for domain
component, and it holds ONE component of a domain.
3) the attribute(s) and the value(s) used in the RDN (the leftmost
part of the DN) must be present in the entry; according to error (2)
your entry cannot add.
moreover,
4) I suspect you get a "No such object" because the parent entry
of what you're trying to add, "dc=CLIENT8, dc=MYTESQ, dc=COM",
does not exist in your database; create branches before leaves.
and, last but not least,
5) the DN is "cn=Manager, dc=CLIENT8, dc=MYTESQ, dc=COM"
which is likely not either a dcObject or an organization; but this is
semantics ...
Your entry should look like
dn: dc=CLIENT8, dc=MYTESQ, dc=COM
objectclass: organization
objectclass: dcObject
o: Example Company
dc: CLIENT8
or, depending on what was your intention:
dn: cn=Manager, dc=CLIENT8, dc=MYTESQ, dc=COM
objectclass: person
cn: Manager
sn: Manager
p.