Hello all,

I am using Windows server 2008 OS as domain controller. When user's request comes, his id & password are verified across Active directory. If his id & password are already present in active directory then java program returns as valid user or otherwise returns as invalid user. Now, password policy is set to default.
I want minimun password length to be 4 chars. & password must be numeric. When i did these settings, java program gives authentication exception.
I have little knoweldge about Active directory integration.

Can anyone help me with active directory settings.
Plz plz help, its urgent.

Can you explain how the question is related to java programming. Post the code and the full text of the error messages.

I am using java program to connect to active directory.
code i am using is as follows:

    Hashtable env = new Hashtable();
        env.put(Context.PROVIDER_URL, "ldap://");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");
        env.put(Context.SECURITY_PRINCIPAL, id);
        env.put(Context.SECURITY_CREDENTIALS, pswd);

        DirContext ctx = new InitialDirContext(env);
        Attributes attrs = ctx.getAttributes("cn="+id+",dc=rsa,dc=com");
        System.out.println("success" + ctx);
catch (NamingException e) {
            // TODO Auto-generated catch block

It works fine with default settings. When i make some changes, it gives authentication excpetion or naming exception. What could be the reason?

This article has been dead for over six months. Start a new discussion instead.