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

Re: ldap_add: Object class violation (65) additional info: no



> I'm running openldap-2.1.30 on Linux.
>
> I get an error "...no structural object class provided" when running
> ldapadd on:
> ldif1.txt
>
> [oscarp@toshiba openldap]$ cat ldif1.txt
>         dn: uid=oscarp, ou=People,dc=tok,dc=com,dc=au
>         sambaLogonTime: 0
>         displayName: Oscar Plameras
>         sambaLMPassword: 552902031BEDE9EFAAD3B435B51404EE
>         sambaPrimaryGroupSID:
> S-1-5-21-2447931902-1787058256-3961074038-1201
>         objectClass: posixAccount
>         objectClass: sambaSamAccount


that's sambaSamAccount, while you're looking
at sambaAccount's schema.  Check the right
definition, I guess it's AUXILIARY.

p.

>         sambaAcctFlags: [UX         ]
>         userPassword: secret
>         uid: oscarp
>         uidNumber: 501
>         cn: Oscar Plameras
>         loginShell: /bin/bash
>         logoffTime: 0
>         gidNumber: 100
>         sambaKickoffTime: 0
>         sambaPwdLastSet: 0
>         sambaSID: S-1-5-21-2447931902-1787058256-3961074038-5004
>         homeDirectory: /home/oscarp
>         sambaPwdCanChange: 0
>         sambaPwdMustChange: 0
>         sambaNTPassword: 878D8014606CDA29677A44EFA1353FC7
>
> [oscarp@toshiba openldap]$ ldapadd -f ldif1.txt -x -h localhost -D
> "cn=root,o=toshiba,dc=tok,dc=com,dc=au" -W
> Enter LDAP Password:
> adding new entry "uid=oscarp, ou=People,dc=tok,dc=com,dc=au"
> ldapadd: update failed: uid=oscarp, ou=People,dc=tok,dc=com,dc=au
> ldap_add: Object class violation (65)
>         additional info: no structural object class provided
>
> I have the ff on 'samba.schema':
>
> snip ...........
>
> objectclass ( 1.3.6.1.4.1.7165.2.2.2 NAME 'sambaAccount' SUP top
> STRUCTURAL
>         DESC 'Samba Account'
>         MUST ( uid $ rid )
>         MAY  ( cn $ lmPassword $ ntPassword $ pwdLastSet $ logonTime $
>                logoffTime $ kickoffTime $ pwdCanChange $ pwdMustChange $
> acctFlags $
>                displayName $ smbHome $ homeDrive $ scriptPath $
> profilePath $
>                description $ userWorkstations $ primaryGroupID $ domain ))
>
>
> snip ...........
>


-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497