How to make a Change Password feature in MOSS 2007

MOSS provides lots of Out-of-Box functionality. like login.aspx page which is located in 12 hives /layouts folder, which is automatically enabled when you turn on Forms-Based Authentication on any of the Zone.
In my previous article i explained how to implement FBA in SharePoint Site.
After implementation of such a good functionality i came to know user can not change password from SharePoint site for FBA. ASP.NET Control is available to achieve this but SharePoint does not provide any OOB Functionality.
In this article you will find how to get Change Password functionality in SharePoint site by adding new “Feature” in the standard user menu.

ChangePassword
ChangePassword

This feature redirects user to a Customized “changepassword.aspx” page. That will prompt for current and new password.

ChangePassword Input
ChangePassword Input

To achieve this functionality we have to go through three steps as below :

1.Create ChangePassword.aspx
2.Create ChangePassword feature
3.Deployment

1.Create ChangePassword.aspx
Apply below code in ChangePassword.aspx web form

2.Create ChangePassword feature
1.Create a new folder ‘ChangePassword’ and create a new XML file with below code in it ‘feature.xml’:

2.Edit feature Id to a unique GUID, you can get it from guidgen in this path C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\guidgen.exe
3.Edit feature Title, Description and Version as per your requirement.
4.Edit Scope property to be ‘Site’ or ‘Web’ to indicate if the feature is used per site or in the entire web
5.In ElementManifest element, set Location property to an XML file location ‘elements.xml’ that contains more feature properties
6.Create ‘elements.xml’ in the same folder with ‘feature.xml’ to be as below:

7.Set CustomAction properties as shown, Location to be ‘StandardMenu’ and UrlAction URL property to be ‘~site/_layouts/changepassword.aspx’ as we are going to add our ChangePassword.aspx to this path.

3. Deployment
1.Copy ‘ChangePassword.aspx’ file to the following path:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\
2.Copy ‘ChangePassword’ folder that contains elements.xml and feature.xml to the following path: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\
3.Open stsadm tool and run the following command:
stsadm -o installfeature -name ChangePassword
Now the feature is installed successfully, but needs to be activated.
4.Open your site, the select Site Actions – Site Settings – Modify All Site Settings.
From the appeared page, select Site Collection Features (under the Site Collection Administration submenu):

SCA1

5.The new feature will be listed, Select Activate.

Feature

6.Now you can find ‘Change Password’ action in the standard user menu:

ChangePassword

And this action redirects to changepassword.aspx page:

ChangePassword2

Done!!!!

2 comments

  1. Heya,

    Apply Below Code ? Where is the code and instructions.

    this blog would be more helpful if you post the and steps to push it to sharepoint.

    -Vissa

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s