Free/Open-Source Self-Service Password Reset tool for Active Directory

Pre-requisites: The following assumptions have been made in this tutorial. Readers should have a basic working knowledge of Microsoft Active Directory, SQL Server and Visual Studio software.

Step 1: Create ACTIVE DIRECTORY SERVICE ACCOUNT

Create an Active directory service account with password reset rights.

Details for this process and a custom Delegwiz.inf can be found in my previous article here

Step 2: Download Visual Studio Project

1) Download the provided source zip file by clicking this link

Bitbucket repository download page

2) Extract and open the project in Visual Studio

Step 3: Create database

Note: The basic steps for creating the database are listed below.

1) From the Open Project in Visual Studio, open ModelSSPR.edmx

2) Right-click on white-space on the diagram page

3) Then select Generate Database from Model

Visual Studio Generate Database from Model option

4) Save the SQL script and use it on Microsoft SQL Server to build the database schema

Generated SQL script for database schema

5) Create an MS SQL user and grant it DB owner rights

Step 4: Modify config file

1) From the open project in Visual Studio

2) Replace the ADConnectionString connection string with the Active Directory LDAP string

3) Replace the SSPREntities connection string with the connection string of the database

Web.config AD and database connection strings

SSPREntities connection string configuration

4) Configure ADMembershipProvider to the account created in Step 1

ADMembershipProvider configuration settings

5) Replace the appSettings values with the correct information

AppSettings action account configuration

Step 5: Publish Site

1) From the open project in Visual Studio

2) Publish site with the Visual Studio Publishing wizard

Visual Studio publish wizard dialog

Step 6: Testing Site

Registering password hints

1) Browse to site published in Step 5

2) Click on Log in

Self-service password reset home page

3) Specify the Username and Password for the account to register for self-service password reset.

Login page with username and password fields

4) Create password hints by adding questions and answers

Security questions and answers registration form

Self-Service Password Reset Request

1) Browse to the site published in Step 5

2) Click on Reset Password

Password reset link on home page

3) Enter the Username for the account to reset the password for

Username entry for password reset

4) Enter answers to the security questions and provide new password

5) Click Reset Password

Security questions with new password fields

6) If the password was successfully reset, the following screen will display

Successful password reset confirmation screen

I hope you found this tutorial useful. You are encouraged to ask questions, report any bugs or make any other comments about it below.

Leave a Reply