#!/usr/bin/perl
# A variant of the ever bash script called make_users.bash
# This one in perl.  Does the same thing.
# It also prepends a 'u' onto the username, incase your school
# has all numeric userids
#
# blah blah, GPL v2, copyright Jeremy Anderson
# jeremy at angelar dot com
# written August 31st, 2003

open(IN, "Accounts.txt");
while ($myline = <IN>) {
	($username, $pass) = split ' ',$myline;
	print ("USER =$username, PASS=$pass|\n");
	$result=(`useradd u$username`);
	$result=(`echo $pass |passwd u$username --stdin`);
}
