#!/usr/bin/perl
open (FILE, "userlist");
@lines = <FILE>;
close (FILE);
foreach (@lines)
    {
    (my $UserName, my $PassWord, my $Uid, my $Group, my $Comment) = split (/:/,$_);
    system("/usr/sbin/useradd -m -k /etc/skel -u $Uid -g $Group -c $Comment -d /export/home/$UserName -s /usr/local/bin/bash $UserName");
    system("/usr/local/bin/autopasswd", $UserName, $PassWord);
    }
