Hi, I'm trying to authenticate from IBM/AS400 to Active Directory with JNDI. I'm new to java. I don't have a clue about Active Directory and it seems that the guys who installed it and administer it are less informed than one would hope for. I found some example code which works to connect to AD. I connect using one password and then I change the context in order to try to authenticate the actual user. This code works as long as I hard-code the known variables. The problem is that I want to be able to use an input form and authenticate knowing nothing about the user except their user-id and password. Either I don't know how to ask the question correctly, or the AD administrators honestly don't know what the hierarchy of our AD server is. I saw something somewhere about being able to use JNDI to find out the metadata for the AD. I have no clue about how to code for that or whether it's actually possible. Here is the code I use to connect with where a username and password and CO are hardcoded. (except that in this example all passwords, user-ids, and urls are not actual.) It is test code and I have coded some system.out.printlns to see how things are proceding.
How can I use the metadata api to determine AD's structure so that I can search from the top? Also, I'm not sure about how to search the subtrees. Any help would be so appreciated. Thanks Rob