#!/usr/bin/perl

$passwd = '/etc/passwd';
$group = '/etc/group';
$home = 'home';

open GROUP,"< $group" or die "unable to open $group";

open PASSWD,"< $passwd" or die "unable to open $passwd";

@passwd = <PASSWD>;
close PASSWD;

foreach(@passwd)
{
    unless(/^\#/)
    {
	my @user = split ':',$_;
	unless($user[2]<100)
	{
	    # we now have the info about a user we care about
	    #open USERFILE, "> users/$user[0]" or die "Cannot open users/$user[0]";
	    #print USERFILE $_;
	    #close USERFILE;
	    print "adduser -uid $user[2] -group $user[3] $user[0]";
	    print "\n";
	}
    }
}
