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

Re: Adding Initial Entries via ldapadd and ldif file



All -

Your quick responses all worked out well. Peter and Mike were correct in their responses, and Sam caught on to the mistake at the end of the ldif. I got it from the tutorial, obviously.

I am getting an error with the dn line of my own entry though.
"dn: cn=pstickney,ou=People,dc=pvpsc,dc=com"

ldapadd: invalid format (line 13) entry: "cn=pstickney,ou=People,dc=pvpsc,dc=com"

I'm very new to ldap, but I am slowly getting it.
Thanks all

-peter


Samuel Tran wrote:

On Thu, 2005-08-04 at 10:39 -0400, Peter Stickney wrote:


------ ldif file --------



dn: cn=pstickney,ou=People,dc=pvpsc,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: inetLocalMailRecipient
objectClass: shadowAccount
uid: pstickney
sn: Stickney
givenName: Peter
cn: pstickney
userPassword:: p455\^/0rD
loginShell: /bin/bash
uidNumber: 1000
gidNumber: 100
homeDirectory: /home/pstickney
gecos: Peter Stickney,IT,x105
mail: pstickney@pvpsc.com
telephoneNumber: x105
labeledURI: http://www.pvpsc.com
description: peters openldap
homePostalAddress: 123 main street
displayName: Peter M. Stickney
homePhone: 401-555-1234
title: Network Admin
------------------------


root@kodos:/usr/local/openldap/bin# ./ldapadd -x -W -D 'cn=Manager,dc=pvpsc,dc=com' -f ../ldif/pvpsc.ldif -c
Enter LDAP Password:
adding new entry "ou=People,dc=pvpsc,dc=com"
ldap_add: No such object (32)


adding new entry "ou=Groups,dc=pvpsc,dc=com"
ldap_add: No such object (32)

ldapadd: invalid format (line 13) entry: "cn=pstickney,ou=People,dc=pvpsc,dc=com"
adding new entry "cn=staff,ou=Groups,dc=linuxlaboratory,dc=org"
ldap_add: Server is unwilling to perform (53)
additional info: no global superior knowledge



Peter,

You need to create your base domain object. You need to add something
like this at the top of your LDIF file:

dn: dc=pvpsc,dc=com
objectClass: dcObject
objectClass: organization
o: My Company
dc: pvpsc


Did you mean "dn: cn=staff,ou=Groups,dc=pvpsc,dc=com" for the last entry of your LDIF file?

Sam