Platform SDK: Active Directory, ADSI, and Directory Services |
There are two ways to set properties on a user object (or any object):
Regardless of the way you set properties, you need to know at least two pieces of information about the property: 1) What is the property's syntax (data type)? and 2) Does the property allow multiple values?
For more information about the User class, see User in the Active Directory Schema reference.
For a sample application that sets properties, see the CreateUser sample, which creates a user from properties specified in an initialization file.
For the password of the user, you should use the IADsUser::ChangePassword method (if your script or application is allowing the user to change his/her own password) or IADsUser::SetPassword method (if your script or application is allowing an administrator to reset a password).