User guide
Changing the User Password
A-17
Changing the User Password
This sample program assumes the environment setup below. Change the setup according to the actual
environment used.
• The public directory for creation of the repository is "ou=interstage,o=fujitsu,dc=com".
• The storage location of user information is "ou=User,ou=interstage,o=fujitsu,dc=com".
• RDN of user information is expressed by "cn".
• The new user password is specified for "newPassword" in java.lang.String.
• The name of the user whose password is to be changed is specified for "user" in java.lang.String.
• The result of common preprocessing is used as the value of "ctx".
Note
When a password is changed to new one, the new password must be handled carefully to protect the
password from attack.
For details about measures that can be used against password attack, refer to "Security Measures"
under "Interstage Single Sign-on" of "Security Risks" of “Security Risks and Measures” of the Security
System Guide.
Description of User Program
Example
Pre-processing
:
ModificationItem[] mods = new ModificationItem[1];
mods[ 0 ] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE,
new BasicAttribute("userPassword", newPassword));
String dn = "cn=" + user + ",ou=User,ou=interstage,o=fujitsu,dc=com";
ctx.modifyAttributes(dn, mods);
:
Postprocessing