Issue 552 - How to define initial entries
Summary: How to define initial entries
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-05-31 10:49 UTC by yimkf@netvigator.com
Modified: 2000-06-02 11:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description yimkf@netvigator.com 2000-05-31 10:49:50 UTC
Full_Name: K. f. Yim
Version: 1.2.9-5
OS: Red Hat Linux 6.2
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (202.84.172.230)


I installed Red Hat 6.2 and verifed that openldap 1.2.9-5 was installed as well.
After configuring the configuration files as per follows:

slapd.conf:

database	ldbm
suffix		"o=CWHKT, c=HK"
#suffix		"o=My Organization Name, c=US"
rootdn		"cn=root, o=CWHKT, c=HK"
#rootdn		"cn=Manager, o=My Organization Name, c=US"
rootpw		secret
# cleartext passwords, especially for the rootdn, should
# be avoid.  See slapd.conf(5) for details.
directory	/var/qmail/users
index		mail,mailAlternateAddress,uid
index		default none

slapd.oc.conf (added entries)

objectclass qmailUser
	requires
		objectClass,
		mail,
		mailMessageStore,
		uid,
		userPassword
allows
	mailAlternateAddress,
	mailUID,
	mailGID,
	mailQuota,
	mailForwardingAddress,
	mailHost,
	deliveryProgramPath,
	deliveryMode,
	mailReplyText,
	qmailDotMode,
	accountStatus

myldif.ldif

dn: cn=Qmail Test, o=CWHKT, c=HK
cn: Qmail Test
sn: Test
objectclass: top
objectclass: person
objectclass: inetOrgPerson
objectclass: qmailUser
mail: qmailtest@kftest.netvigator.com
mailHost: kftest.netvigator.com
mailQuota: 5000000S,100C
qmailUID: 1001
qmailGID: 1001
uid: qmailtest
userPassword: qmailtest

dn: cn=root, o=CWHKT, c=HK
cn: root
sn: root
objectclass: person
	
I used the command: /usr/bin/ldapadd �VD ��cn=root, o=MyOrg, c=HK�� �VW <
myldif.ldif and got the following error message.

ldap_add: Object class violation

Do I need to update the slapd.at.conf for the attributes I defined in LDIF.

KF

Comment 1 kunkee@openldap.org 2000-05-31 16:19:27 UTC
> Full_Name: K. f. Yim
> Version: 1.2.9-5
> OS: Red Hat Linux 6.2
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (202.84.172.230)
> 
> 
> I installed Red Hat 6.2 and verifed that openldap 1.2.9-5 was installed as well.
> After configuring the configuration files as per follows:
> 
> slapd.conf:
> 
> database	ldbm
> suffix		"o=CWHKT, c=HK"
> #suffix		"o=My Organization Name, c=US"
> rootdn		"cn=root, o=CWHKT, c=HK"
> #rootdn		"cn=Manager, o=My Organization Name, c=US"
> rootpw		secret
> # cleartext passwords, especially for the rootdn, should
> # be avoid.  See slapd.conf(5) for details.
> directory	/var/qmail/users
> index		mail,mailAlternateAddress,uid
> index		default none
> 
> slapd.oc.conf (added entries)
> 
> objectclass qmailUser
> 	requires
> 		objectClass,
> 		mail,
> 		mailMessageStore,
> 		uid,
> 		userPassword
> allows
> 	mailAlternateAddress,
> 	mailUID,
> 	mailGID,
> 	mailQuota,
> 	mailForwardingAddress,
> 	mailHost,
> 	deliveryProgramPath,
> 	deliveryMode,
> 	mailReplyText,
> 	qmailDotMode,
> 	accountStatus
> 
> myldif.ldif
> 
> dn: cn=Qmail Test, o=CWHKT, c=HK
> cn: Qmail Test
> sn: Test
> objectclass: top
> objectclass: person
> objectclass: inetOrgPerson
> objectclass: qmailUser
> mail: qmailtest@kftest.netvigator.com
> mailHost: kftest.netvigator.com
> mailQuota: 5000000S,100C
> qmailUID: 1001
> qmailGID: 1001
> uid: qmailtest
> userPassword: qmailtest
> 
> dn: cn=root, o=CWHKT, c=HK
> cn: root
> sn: root
> objectclass: person
> 	
> I used the command: /usr/bin/ldapadd �VD ��cn=root, o=MyOrg, c=HK�� �VW <
> myldif.ldif and got the following error message.
> 
> ldap_add: Object class violation
> 
> Do I need to update the slapd.at.conf for the attributes I defined in LDIF.
> 
> KF

Assuming schemacheck is on, I can see at least the following violations:

qmailuser requires "mailMessageStore" but you don't supply it.
qmailuser neither allows nor requires "sn", but you *do* supply it.

Of course, if schemacheck is off then this should not be a problem, and
you need help from somebody else.

Also, this might be obvious to you (but isn't to everyone): you must shut down
and restart slapd whenever you make changes to the configuration files.

Randy
Comment 2 Kurt Zeilenga 2000-06-02 11:29:03 UTC
changed state Open to Closed