[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: How to define initial entries (ITS#552)



> 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