Hi,
My name is Nick and my friend bganoush has been nice enough to let me use his account to ask for some help in here.
Some background info first. I have access to a windows 2003 server where ADAM (active directory application mode) is installed. I installed a new ADAM instance on this server and created an application partition called o=JNDITutorial. This ADAM instance is setup to run as a network service and the administrator for this instance is my account on the server itself. Inside this application partition I also created an organizational unit ou=LDAPUsers. I then added a user to this ou, CN=Nick,OU=LDAPUsers,O=JND
ITutorial and enabled the account and set a valid password. From there I added this ADAM user to the Administrator group/role that is already defined in the ADAM schema. I'm thinking this user Nick should now have full administrative rights within the ADAM instance.
What I want to do know is extend the ADAM schema so that I can store Java objects in the directory.
I've been reading this tutorial
http://java.sun.com/products/jndi/tutorial/trailmap.htmlIn the preparations section is a Java program that will connect to the LDAP server and create the necessary schema classes so that the directory can store Java objects. The program can be found here
http://java.sun.com/products/jndi/tutorial/config/LDAP/CreateJavaSchema.javaThe attributes and classes I am trying to add so that the directory supports Java objects can be found here,
http://java.sun.com/products/jndi/tutorial/config/LDAP/java.schemaI modified the program by hardcoding my server url in along with the username and password for the user CN=Nick,OU=LDAPUsers,O=JND
ITutorial.
The program connects to the ADAM server perfectly but then fails when it tries to update the schema. Here is the exception that is thrown,
[updating Active Directory schema ...]
[locating the schema]
[inserting new attribute definitions ...]
javax.naming.NoPermissionE
xception: [LDAP: error code 50 - 00000005: SecErr: DSID-031520D9, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
]; remaining name 'cn=javaClassName'
at com.sun.jndi.ldap.LdapCtx.
mapErrorCo
de(Unknown
Source)
at com.sun.jndi.ldap.LdapCtx.
processRet
urnCode(Un
known Source)
at com.sun.jndi.ldap.LdapCtx.
processRet
urnCode(Un
known Source)
at com.sun.jndi.ldap.LdapCtx.
c_createSu
bcontext(U
nknown Source)
at com.sun.jndi.toolkit.ctx.C
omponentDi
rContext.p
_createSub
context(Un
known Source)
at com.sun.jndi.toolkit.ctx.P
artialComp
ositeDirCo
ntext.crea
teSubconte
xt(Unknown
Source)
at com.sun.jndi.toolkit.ctx.P
artialComp
ositeDirCo
ntext.crea
teSubconte
xt(Unknown
Source)
at CreateJavaSchema.insertADA
ttributes(
CreateJava
Schema.jav
a:498)
at CreateJavaSchema.updateADS
chema(Crea
teJavaSche
ma.java:43
8)
at CreateJavaSchema.updateSch
ema(Create
JavaSchema
.java:211)
at CreateJavaSchema.run(Creat
eJavaSchem
a.java:109
)
at CreateJavaSchema.main(Crea
teJavaSche
ma.java:97
)
The exception is thrown when it tries to create the very first attribute. I think it's telling me the user I supplied doesn't have sufficient rights to modify the schema. I thought this would work given that the user I created has been added to the Administrators role/group within the ADAM instance.
I am a seasoned Java developer but this is my first stab at LDAP and using ADAM. I am rather disappointed with the lack of documentation out there on ADAM. Most of it gives the basics and assumes you have worked with Active Directory before. So finding help on how to update the Schema using this Java program has been frustrating.
I appreciate any help anyone can provide,
Thanks,
Nick
Start Free Trial