Squires Technology Services
Enterprise Technology for the Real World

User Management

I worked in a relatively small school district with around 1000 student users. The district wanted each student to have a unique login. We tried delegating the task of creating students, changing passwords, and keeping them in correct groups to other staff. They could not keep up with changes in rosters and would create usernames that were not consistent.

Back then, some schools had generic accounts for students and only created accounts for select students. Some larger schools would periodically extract data from the School Information System database and run a command against the text file that would create the student account. As a one man shop, I needed something that would be able to consistently create accounts with unique username, password and network folder. The solution needed to move students into and out of groups based on tracked information (campus, grade …), as well as, disabling accounts when a student left the district and reactivating the account when they returned.

The first attempts at this were done by having a text report created and a command line loop to iterate through the list to create the new accounts. As I found this to be a bit limiting, I started writing this script. I directly extracted the information into the script and did away with the need for a separate text file. I added code to replace the generic password with a randomly generated password and created a data table that stored username and preliminary passwords. I built in reporting so teachers would get username and preliminary passwords for their students. In added functionality to disable, move and change accounts based on the status of the student.

I have customized this script for schools that had different School Information Systems and were of varying sizes. In one instance, when activated the first time, we created 3000 student accounts in less than a minute. In most cases I have the script run once a day; however, at the request of one client I had the script run multiple times during the day.

As this is not the first version of the script it is not the last. Technology has changed. There are better scripting languages, and database integration is now the norm. There are actually commercially available programs that will do what this script does. The next version of this will probably be written as a PowerShell script or in some language like C# or Perl.