Yiannis Mavroukakis wrote:
Mega slow email, sorry for the late reply,
Here is the code that does the modify (used to work under OpenLDAP)
LdapContext ctx = JNDIUtils.lookup( LdapContext.class ,
"external/ldap/gameaccount" );
LdapRecord record = null;
LdapContext dir = JNDIUtils.lookup( ctx , "ou=Player" );
Attributes attrs = new BasicAttributes();
BasicAttribute oc = new BasicAttribute( "objectClass" );
oc.add( "top" );
oc.add( "person" );
oc.add( "organizationalPerson" );
oc.add( "inetOrgPerson" );
oc.add( "gaPlayer" );
attrs.put( oc );
put( attrs , "cn" , alias );
attrs.put( "userPassword", password.getBytes() );
dir.modifyAttributes( createLdapName( new Rdn( "cn", alias ) ),
LdapContext.REPLACE_ATTRIBUTE, attrs );
I have the same test working (slightly different, nut not that much) :
try
{
DirContext systemCtx = ( DirContext ) getWiredContext(
ldapService ).lookup( "ou=system" );
String rdn = "cn=Kate Bush";
Attributes attrs = new BasicAttributes();
BasicAttribute oc = new BasicAttribute( "objectClass" );
oc.add( "top" );
oc.add( "person" );
oc.add( "organizationalPerson" );
oc.add( "inetOrgPerson" );
attrs.put( oc );
attrs.put( "cn" , "Kate Bush" );
attrs.put( "userPassword", "test".getBytes() );
systemCtx.modifyAttributes( rdn,
LdapContext.REPLACE_ATTRIBUTE, attrs );
}
Can you add your own test in the server-integ project (operations ->
modify) and give us the result ?
Thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org