Logo Home   Documents & Lists   Site Settings   Help   
SharePoint Support
Common User Issues: How can a user change their own password...
Post Reply Post Reply
Edit Edit Message
Delete Delete Message
Alert Me
Go Back to Discussion Board
Posted At: 8/23/2004 7:31 PM
How can a user change their own password -- (i noticed it has been posed before but no answer - moderator help)
We are running Windows Sharpoint Services (WSS) Ver. 2 and have it configured to authenticate against the our Active Directory. Users inside the firewall can chage their passwords using the standard Windows utilities. User outside of the firewall, however, don't have that ability out of the box.
To get around this we ended up writing a web part giving external users the ability to change their own password. The web part leverages Directory Services to perform the operation. The snippet of code below is what performs the operation:
using System.DirectoryServices;
//Format the id using a slash rather than backslash
string AdjUserId = UserId.Replace(@"\","/");
DirectoryEntry UserEntry = new DirectoryEntry("WinNT://" + AdjUserId);
object[] psw = new object[] {OldPassword,NewPassword};
UserEntry.Invoke("ChangePassword", psw);
Hope this helps.
Created at 8/23/2004 7:31 PM by
Last modified at 8/23/2004 7:31 PM by