Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

Password Change

Last post 09-23-2006, 10:24 AM by vikas. 0 replies.
Sort Posts: Previous Next
  •  09-23-2006, 10:24 AM 167

    Password Change

    Hi

    I am using the native IADsUser interface to change a user's password.
    The code I am using is something like this:

    //Get DirectoryEntry for user.
    IADsUser dsUser =  DirectoryEntry.NativeObject as IADsUser
    dsUser.ChangePassword(old, new);

    The password gets changed. All is fine till there.
    The trouble comes when I login again. If I use the old password, the error I
    get is
    "The server is not operational", instead of a "Logon failure " message.
    Instead If i use a random string like "abc" to login, I get a correct error
    "Logon failure".
    Can anyone tell me how to fix this. I need the appropriate error message whether the user logs in with a wrong password or his old password (which is wrong as it is). I am using Windows Server 2003.

    Thanks and regards
    Vikas Manghani

View as RSS news feed in XML