@Kiran : great, that worked fine !
@Emmanuel : done : https://issues.apache.org/jira/browse/DIRSERVER-1784

Thanks again, the workaround is OK !
Regards,
Anthony


On Tue, Dec 18, 2012 at 5:22 AM, Jim Willeke <j...@willeke.com> wrote:

> The rfc2307bis.schema defines posixGroup as an AUXILIARY ObjectClass to be
> added to an existing group entry.
>
> objectclass ( 1.3.6.1.1.1.2.2 NAME 'posixGroup' SUP top AUXILIARY
>   DESC 'Abstraction of a group of accounts'
>   MUST gidNumber
>   MAY ( userPassword $ memberUid $
>         description ) )
>
>
> --
> -jim
> Jim Willeke
>
>
>
> On Tue, Dec 18, 2012 at 3:03 AM, Emmanuel Lécharny <elecha...@gmail.com
> >wrote:
>
> > Le 12/18/12 8:32 AM, Kiran Ayyagari a écrit :
> > > try it this way
> > >
> > >   @Before
> > >  // simplest way to enable a schema in embedded mode
> > >   public void enableNis() throws Exception  {
> > >       if(!service.getSchemaManager().isEnabled( "nis" ))
> > >       {
> > >           service.getSchemaManager().enable( "nis" );
> > >       }
> > >   }
> > >
> > >   //that will work just fine
> > >   @Test
> > >   @ApplyLdifs( {
> > >           "dn: ou=groups,dc=mycompany,dc=com",
> > >           "objectClass: organizationalUnit",
> > >           "ou: groups",
> > >           "description: Groups"
> > >   }
> > >   )
> > >   public void authenticateAndAuthorizeFromDynamicGroup() throws
> > Exception {
> > >       // operators group
> > >      // this needs to be added manually instead of adding using
> > ApplyLdifs
> > >      Entry entry = new DefaultEntry(
> > > "cn=operators,ou=groups,dc=mycompany,dc=com",
> > >       "objectClass: posixGroup",
> > >       "cn: operators",
> > >       "gidNumber: 5000",
> > >       "description: Operators Group",
> > >       "objectClass: posixGroup",
> > >       "cn: operators",
> > >       "gidNumber: 5000",
> > >       "description: Operators Group");
> > >
> > >      LdapConnection connection = IntegrationUtils.getAdminConnection(
> > > service );
> > >      connection.add( entry );
> > >
> > >      assertTrue(connection.exists( entry.getDn() ));
> > >   }
> > >
> > > for some reason not yet clear to me FrameworkRunner is failing while
> > adding
> > > the cn=operators entry  when present in ApplyLdifs
> >
> > I'm wondering if the schemas should not be reloaded after having enabled
> > the NIS schema...
> >
> > Anthony, I suggest you fill a JIRA asking for the creation of a special
> > annotation, solthing like @EnableSchema( <list of schema to enable> ) ad
> > @DisableSchema( <List of schema to disable> ).
> >
> > That could be useful.
> >
> > We will continue to investigate the reason the NIS schema is not enabled.
> >
> >
> >
> > --
> > Regards,
> > Cordialement,
> > Emmanuel Lécharny
> > www.iktek.com
> >
> >
>

Reply via email to