AD Change User Password: Access Denied 
Author Message
 AD Change User Password: Access Denied

Greetings,

I have an ASPX UI that calls a web service to change the users password in
Active Directory.

I am getting an Logon Failure Access Denied, with the user who has logged on
to the account correctly with the correct username and password.

I have even tried WindowsImpersonationContext.

This is the method that is called from the [WebMethod]... any ideas or
suggestion would be great.

Micah
public void ChangePassword( string OldPassword, string NewPassword )

{

try

{

DirectoryEntry de = new DirectoryEntry( this.Path,
this.Properties["samaccountname"].Value.ToString(), OldPassword,
AuthenticationTypes.Secure );

object[] tt = new object[]{ OldPassword, NewPassword };

de.Invoke( "ChangePassword" ,tt );  $$$ Fails here $$$

de.CommitChanges();

de.Close();

Quote:
}

catch( Exception exc )

{

throw exc;

Quote:
}
}



Thu, 02 Sep 2004 02:52:33 GMT  
 AD Change User Password: Access Denied

Quote:
> this.Properties["samaccountname"].Value.ToString(), OldPassword,
> AuthenticationTypes.Secure );


Willy.

Quote:

> Greetings,

> I have an ASPX UI that calls a web service to change the users password in
> Active Directory.

> I am getting an Logon Failure Access Denied, with the user who has logged on
> to the account correctly with the correct username and password.

> I have even tried WindowsImpersonationContext.

> This is the method that is called from the [WebMethod]... any ideas or
> suggestion would be great.

> Micah
> public void ChangePassword( string OldPassword, string NewPassword )

> {

> try

> {

> DirectoryEntry de = new DirectoryEntry( this.Path,
> this.Properties["samaccountname"].Value.ToString(), OldPassword,
> AuthenticationTypes.Secure );

> object[] tt = new object[]{ OldPassword, NewPassword };

> de.Invoke( "ChangePassword" ,tt );  $$$ Fails here $$$

> de.CommitChanges();

> de.Close();

> }

> catch( Exception exc )

> {

> throw exc;

> }

> }



Fri, 03 Sep 2004 00:47:20 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. how to changed ad's user's password with csharp (different server)

2. how to changed ad's user's password with csharp

3. user change or change user rights for MS ACCESS DB with DAO (MFC)

4. COM wrapper for DLL and rebuild errors - access denied file in use by another user

5. Stop messenger service power user: access denied

6. DirectoryServices access denied when adding user object

7. Change user database password

8. Changing a user password

9. Change Age of NT User Password

10. User must change password...

11. Help:How to change user password of WindowsNT in program

12. How to change the user password of windowsNT

 

 
Powered by phpBB® Forum Software