LdapContext getResponseControls() always return null?

We use Sun One Directory Server 5.2 and have configured user password policy to expire 10 days from reset. Now I have a user whose password is about to expire and "passwordExpWarned" attribute is set to 1 by Directory Server already.

However, when my Java code trying to read the LDAP Controls back, getResponseControls() always returns null. The source code follows the example from

http://archives.java.sun.com/cgi-bin/wa?A2=ind0101&L=jndi-interest&P=R5 327

Do I need to change any configuration on Sun DS server to activate the LDAP Controls for PasswordExpiringResponseControl (OID = "2.16.840.1.113730.3.4.5")?

When I check on AdminConsole, my server under "cn=features,cn=config" only shows "2.16.840.1.113730.3.4.3" which is persistent search, but no password control OIDs, is that the reason that I do not receive response controls back?

Thanks,

[900 byte] By [jz_mavericka] at [2007-11-27 2:39:17]
# 1

If the password policy is enabled and passwordMaxAge, passwordWarning are set, then the controls will be returned. There is nothing else to set to enable this.

The control OID does not appear in the supportedControls nor under cn=features,cn=config because it is a returned control not one that a client application can send, and is not subject to any restriction (access control).

Regards,

Ludovic.

ludovicpa at 2007-7-12 3:01:10 > top of Java-index,Web & Directory Servers,Directory Servers...