Novell - Password Request/Response Controls in java

823 Views Asked by At

I need to change the password of a user and then check the password policy of that user for admin reset. I have configured Universal Password for the server. I am not being able to find the Password Request/Response Controls in Java for Novell. Could anybody please help?

2

There are 2 best solutions below

3
mvreijn On

You can use native JNDI calls to set the password if your bind user has the rights to do so. If you want more, your best bet is to use the Java NMAS library that Novell / NetIQ provide.

Mainly you need to construct a com.novell.security.nmas.mgmt.NMASPwdMgr object which will provide access to the password policy and password set functions.

// Construct password manager using a javax.naming.ldap.LdapContext
LdapContext ctx = getContext();
NMASPwdMgr pwdMgr = new NMASPwdMgr( ctx );
// Now you can set the password
pwdMgr.setPwd("TREE_NAME", "cn=your,ou=object,o=dn", "yourPassword");
// Or you can check if the / a password complies with policy
pwdMgr.pwdPolicyCheck("TREE_NAME", "cn=your,ou=object,o=dn", "yourPassword");
2
jwilleke On

Changing the password as a "admin" is an easy change the userPassword attribute.

Not real sure what "check the password policy of that user for admin reset" implies, but if you want to see if it was a "Admin Reset" you can use this link: https://ldapwiki.com/wiki/Edirectory%20Administrative%20Password%20Changes

-jim