Just create a file storing the users first name, lastname and password (seperated by a space). The name the file users.txt and execute the python script below. Download the source here.

Example users.txt:

John Smith Password1
Sam Jones Password2

Python Script:

#!/usr/bin/env python# Import modules
 
import os
import commands
 
# Define the programs variables
def addUsers():
    inFile = open("users.txt", "r")
    for line in inFile:
        first, last, passwd = line.split()
        cName = (first[0] + last[:7]).lower()
        password = (passwd[:8])
        add = "useradd " + cName + " -G " + cName + " -d /home/" + cName + " -p " + password
        print add
    inFile.close()
 
addUsers()