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

Re: ldapmodify



On Wednesday 18 August 2004 11:52, Mike O'Rourke wrote:

> >\
>
> Hi Misty,
>
> - What is in the LDIF file above the entry for Joe Schmo?
I will paste it below.  The issue is a little different now because I have 
added all kinds of objectClasses trying to get it to work.

> - Is Joe's the last entry in the LDIF file? (If so, is there at least
> one blank line after it?)
It is the only entry.  I tried with and without one blank line.

> - What does Joe's current (unmodified) LDAP entry look like (of course,
> without divulging any private info)?

Here is the current LDIF:
dn:cn=Joe Schmo,ou=people,dc=mycompany,dc=com
cn: Joe Schmo
givenName: Joe
sn: Schmo
o: somedivision
title: Customer Service/Receptionist
l: Mytown
l: Somestate
postalCode: 12345
homePostalAddress:: MTExMjIgRm9yZXN0IERyaXZlDQpQbHltb3V0aCwgSU4gNDY1NjQ=
telephoneNumber: 1234567
mail: jschmo@mycompany.com
street: 1234 Some Street
objectClass: top
objectClass: inetOrgPerson
objectClass: person
objectClass: organizationalPerson
uid: joe

Here is the LDIF with the attributes I am trying to add:
dn: cn=Joe Schmo,ou=people,dc=mycompany,dc=com
objectClass: posixAccount
uidNumber: 1001
userPassword: {crypt}7FZxyiS7L2E9I
loginShell: /dev/null
gidNumber: 2000
homeDirectory: /home/joe
gecos: Joe Schmo

baa:/etc/openldap # ldapmodify -v -D "cn=Manager,dc=mycompany,dc=com" -W -x -a 
-f test.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
add objectClass:
        posixAccount
add uidNumber:
        1001
add userPassword:
        {crypt}7FZxyiS7L2E9I
add loginShell:
        /dev/null
add gidNumber:
        2000
add homeDirectory:
        /home/joe
add gecos:
        Joe Schmo
adding new entry "cn=Joe Schmo,ou=people,dc=mycompany,dc=com"
ldapmodify: update failed: cn=Joe Schmo,ou=people,dc=mycompany,dc=com
ldap_add: Object class violation (65)
        additional info: no structural object class provided

I thought 'person' was a structural object class.  I also tried adding 
'account' as an objectClass, but I get other errors there.  I don't know what 
I am missing.  I was able to finally replace the UID, but only all by itself, 
in a separate LDIF.

Misty at her wits' end
>
> Mike