#########################################################################################
All my work is free to use.  I ask that you don't sell it, but I'm not your mom.
No warranty is implied.  These scripts are free and don't break anything in my district.
I can't make guarantees on what it will do in your environment.
#########################################################################################

The majority of the ASP code for these pages was written by Nicholas Hay of Monroe ISD.  
Nick was nice enough to let me base these pages on his work.  All the instructions are 
mine, and there are some changes and additional features that I added on.  The lion's 
share of the credit for the work done on these ASP scripts belongs to Nick.  These
scripts are shared with Nick's permission.

#########################################################################################

IMPORTANT NOTE - The App_Code folder and the CryptoHelper.cs file are essential for this script.  Without it, the password cannot be encrypted and decrypted.

ACTIVE DIRECTORY USERS - This script requires 2 Active Directory users.  One needs to be a user with the power to change settings in Active Directory - "admin".  The other just needs read access to the directory.

CONFIGURE PASSWORD HASH - On line 4 of the web.config file, you'll initially need to place the password in plain text for the script to work.  To hide this moving forward, we'll need to encrypt it.  Follow these instructions carefully to encrypt that password.

First, follow all the instructions posted below about configuring each necessary line in the scripts.  Follow each set of instructions carefully.  Once you complete these steps, the script should be functioning, you just don't want to make it public because there is an "admin" username/password in plain text.  For testing, it's not a bad idea to stop here and run a couple students through to make sure everything is working.

When you're ready to continue, on line 188 of the default.aspx file, remove the comment markers ( // )from the following line:  Response.Write(CryptoHelper.Encrypt("", ConfigurationManager.AppSettings["Passphrase"]));

Once that is complete, save all the modified pages and simply load the login.aspx page in a browser.  In the upper left corner of the page you should see what appears to be random text displayed.  That is your hashed password.  Simply copy that text and paste it in place of the password on line 4 of the web.config file in place of the plain text password.

Finally, you'll need to re-comment line 188 of the default.aspx file so the hashed password doesn't show up on the page any longer.  Save and test.  That's it!

#########################################################################################

Password reset portal:
Teacher goes to portal page.  Username and password are their Active Directory credentials.  Teacher can then submit username of a student.  The student password is set back to “default” (set below).  An email is sent to an archive email address and an email is sent to the student with password change instructions.

web.config - Change the following lines
3 - Change domain\adminusername
4 - Set plain text admin password (we’ll change this later)
5 - Change to any random set of characters (this is the hash that will be used to encrypt your password, longer is better)
6 - Set what you want the “default” student password to be
7 - Change domain
8 - Change email domain
9 - Change archive email address.  Archive email address is for record keeping so you can tell when a student’s password was last changed.
10 - Change SMTP server (non TLS)
11 - This is the message that will show if a student is disabled in AD
14 - Name is just a variable, leave it alone.  connectionString change to ldap path for your domain
34 - Change to domain groups that should have access to request password changes (teachers, staff)
38 - Scroll way right to connectionUsername and connectionPassword.  Change to a service account in AD.  This user should not be an administrator or have rights to anything special.

site.master - Change the following lines
15 - Change page title
17 - Change color of the page background
21 - Change the border information and the table background color
30 - Change to location and name of your logo.  Place the logo in the /images folder
32 - Change text that will appear under the logo in the header
76 - Change text that will appear in the page footer

default.aspx - Change the following lines
29 - This line says that only users who are in the “student” OU or its sub-containers can be changed using this tool.  Change this search parameter to match your Active Directory configuration.  Note: this searches for “student” anywhere in the OU name, so “HS Student Users” would get picked up.  Conversely, a “Student Teachers” OU would also be picked up, so choose the search parameter here carefully.
38, 161, 211, 238 - These are all on-screen messages that you might want to change to fit your environment
105 - Change to the return address for outgoing emails
107, 108 - Subject and body of email to students upon reset
188 - See the instructions for configuring administrator password hash in this document
203 - Another on-screen message, but this one contains the default password.  Change to fit your environment

login.aspx
21 - Change email domain
32, 34 - These lines contain the welcome message that users are greeted with on the login page


