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

Re: Error loading ldiff files



On Friday 21 October 2005 10:03, you wrote:
> Hi,
>
> I am building a testing ldap for my environment. In fact, I did and I
> started playing with it. However, the server where I am doing the test
> was rebooted and the db got corrupted.

Best you fix this (hint: checkpoint) first.

> I run the db_recover command and 
> it was supposed to be fine but it had a strange behaviour which I
> decided to start the db from scratch.
> It seems that there is a structure which I am not able to load anymore.
> Before I was using the same files and I could install it. I have double
> check the structure definitions but I am not able to see what is wrong.
>
> The file is related to the 'groups' definition. The group structure has
> been loaded successfully but I got errors trying to load  a particular
> group.
>
> I typed: ldapadd -v -x -D "cn=admin,dc=bsc.es" -W -f  file.ldiff
>
> # Good one
> opsld01:/home/xavierf/dev/ldap # more top_level_group_entry
> dn:ou=Group,dc=bsc.es
> ou:Group
> objectClass:top
> objectClass:organizationalUnit
>
> This one is fine. But when I try with this one I got the error below. I
> am using sles9 2.6.5-7.191-smp #1 SMP Tue Jun 28 14:58:56 UTC 2005
> x86_64 x86_64 x86_64 GNU/Linux with openldap. I thing the error is
> related to the structure definition but I can't see it....
>
> # Wrong one
> opsld01:/home/xavierf/dev/ldap # more group_entry
> dn:cn=sysadmin,ou=Group,dc=bsc.es
> objectClass:posixGroup
> objectClass:top
> cn:sysadmin
> gidNumber:700
> memberUid:xfustero
> description:System Managers
>
> opsld01:/home/xavierf/dev/ldap # ldapadd -v -x -D "cn=admin,dc=bsc.es"
> -W -f group_entry
> ldap_initialize( <DEFAULT> )
> Enter LDAP Password:
> add objectClass:
>        posixGroup
>        top
> add cn:
>        sysadmin
> add gidNumber:
>        700
> add memberUid:
>        xfustero
> add description:
>        System Managers
> adding new entry "cn=sysadmin,ou=Group,dc=bsc.es"
> modify complete
> ldap_add: Object class violation (65)
>        additional info: no structural object class provided

IIRC, by default SUSE uses rfc2307bis, where posixGroup is not structural, you 
should add the objectclass groupOfNames as well (this may also require that 
you add at least one member attribute ... not sure in the case of 
rfc2307bis).

Regards,
Buchan


-- 
Buchan Milne
ISP Systems Specialist
B.Eng,RHCE(803004789010797),LPIC-2(LPI000074592)

Attachment: pgp4Fey0QiVgK.pgp
Description: PGP signature