Changes the authentication password for an eDirectory object once a public/private key pair has been assigned. Does not support international or extended characters in passwords.
#include <nwnet.h> or #include <nwdsasa.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSChangeObjectPassword ( NWDSContextHandle context, nflag32 pwdOption, pnstr8 objectName, pnstr8 oldPassword, pnstr8 newPassword);
uses netwin32 Function NWDSChangeObjectPassword (context : NWDSContextHandle; pwdOption : nflag32; objectName : pnstr8; oldPassword : pnstr8; newPassword : pnstr8 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Specifies which password to change. Select from the following:
(IN) Points to the object name whose password is to be changed.
(IN) Points to the object’s current password.
(IN) Points to the object’s new password.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
For NWDSChangeObjectPassword to succeed, oldPassword must be correct. If no value is currently assigned to the password, oldPassword should point to a zero-length string.
If no new password value is desired, newPassword should point to a zero-length string.
If an application has a local copy of any password value, the value should be erased as soon as possible to prevent compromising the security of the password.
The NT_PASSWORD option works only if the eDirectory for NT product has been installed. If this flag is passed in and the eDirectory for NT product has not been installed, an error is returned.
If the ALL_PASSWORDS option is set, the NDS_PASSWORD operation is performed first. If successful, other password operations are attempted, but error conditions are not returned for the other operations.
NOTE:NWDSChangePwdEx supports international and extended characters and is recommended in place of NWDSChangeObjectPassword.