Automation Script for creating accounts

Hello All,

The Task:
I have been tasked with creating the .csv import file for our incoming students that will need our school-issued Gmail account. In previous years this was completed by manually inputting the first initial + for each student. With over 15-20k+ students this was a cumbersome task.

Actions Taken
I have their first name and last name inputted into the template .csv provided by Google as well as the generic password shared for all upon first access.

What I need to accomplish
I need to fill in the email column that defines the student account. For example.
John Doe > jdoe
Crystal Redding > credding

My Question
Is there a programming language that would be able to take the value of the First Name + Last Name Columns output it into the email column with amended to the end? If so, how and where would? Any assistance would be greatly appreciated. Thank you for your time!

Most programming languages will be able to do that. I like Python, so: You can use the csv module to read the CSV file, the example for the DictReader class in the documentation does something similar to what you want on the input side. Once you have the names you can use regular string formatting to build the mail addresses:

mail = f'{first[0].lower()}{last.lower()}'

However, I see two issues there:

  1. You might have collisions (identical output for different people), and you’ll need to find a way to detect and handle them. Even with way fewer students it’d be possible, with thousands it seems likely.
  2. Having the same default password for everyone may be a privacy rights complaint waiting to happen, depending on your jurisdiction. And even if legally safe you’re risking an administrative headache if people change the initial password on others’ accounts.
1 Like

Copy that, thank you for your response! I actually was able to use Excels =TEXTJOIN() function which populated the email column as needed. I did run into some formatting issues which were remediated using the Find/Replace function. In regards to the default password; would it still be an issue if the password was changed by the account holder once they log in? For example: John Doe is issued Password: generic123 > Log in > Change Password. Thank you for your input and time!

Yes, because it’s still a generally known password, which is always bad. Having to change it on first login doesn’t change that (but is good practice nonetheless). Anyone could log in to any student’s account that way.

If that “anyone” immediately has to change the password that just means the students will notice, but they still can get whatever information is already present (that’s important for the privacy aspect, depending on what data there is it may be further abused). And changing the password means the student won’t be able to use the account until you do a reset (that’s the administrative hassle part). Worst case you might have some students who don’t report the login problem until way later, when they missed important information or assignments.

Also, considering you’re talking about email addresses: I bet some spammers would love to use those, even if just for a few days!

Long story short: If you hand out passwords, always use random, individual ones.

1 Like

Roger that! I will make the appropriate changes to pre-empt the possibility of these obstacles presenting themselves.

The only obstacle I forsee is deleniating the unique login credentials to each students personal email so they may securely login.

Would randomizing the passwords, uploading the .csv import file, and then pushing a reset password request to their personal email be an actionable solution for them to gain entry? This way no credentials are sent over the net, and only emails listed would recieve the reset password request for the account.

Let me know what your thoughts are on this, and thank you again for your help. I am new to the community, and you have left a great first impression for use.

I’d say it’s a reasonable concept, about the level of security most websites with password-based logins offer, and probably suitable unless there is particularly sensitive data in the accounts. Designing password reset systems has its own challenges, but assuming that’s sound it’s probably safe enough.

And I’m glad to hear I left a good impression! :smile: