NWDSChangePwdEx

Changes the authentication password for an eDirectory object once a public/private key pair has been assigned. Supports international and extended characters in passwords.

Local Servers:blocking
Remote Servers:blocking
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP
Library:Cross-Platform NDS (NET*.*)
Service:NDS

Syntax

C

  #include <nwnet.h> 
  or 
  #include <nwdsasa.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSChangePwdEx  ( 
     NWDSContextHandle   context,
     pnstr8              objectName,  
     nuint32             pwdFormat,  
     nptr                oldPwd,  
     nptr                newPwd,  
     nuint32             pwdOption); 
  

Pascal

  uses netwin32 
   
  Function NWDSChangePwdEx 
    (context : NWDSContextHandle; 
     objectName : pnstr8; 
     pwdFormat : nuint32; 
     oldPwd : nptr; 
     newPwd : nptr;
     pwdOption : nuint32 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

objectName

(IN) Points to the object name whose password is to be changed.

pwdFormat

(IN) Specifies the format of the password data. Select from the following:

  • PWD_UNICODE_STRING
  • PWD_UTF8_STRING
  • PWD_RAW_C_STRING
oldPwd

(IN) Points to the object’s current password.

newPwd

(IN) Points to the object’s new password.

pwdOption

(IN) Specifies which password to change. Select from the following:

Value

Constant

Description

0

ALL_PASSWORDS

All passwords are changed.

1

NDS_PASSWORD

Only the eDirectory password is changed.

2

NT_PASSWORD

Only the NT password is changed (the NT password that NDS4NT in eDirectory).

4

AD_PASSWORD

Only the AD/NT password (serviced by password sync).

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

Nonzero values indicate errors. See NDS Return Values.

Remarks

For NWDSChangePwdEx to succeed, oldPwd 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, newPwd 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 option is set 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:The PWD_RAW_C_STRING password format allows any arbitrary NULL-terminiated data to be used as a password. Passwords specified with this format are not interoperable with unicode and UTF8 passwords.

NCP Calls

See Also

NWDSGenerateKeyPairEx