#!/usr/bin/perl
# "A bit more tricky part. Takes glftpds passwd file as argument"
# "change the print line to show right path from '/site'"
# cpass.pl /glftpd/etc/passwd >> /etc/passwd
# "that will append the userbase to passwd file. And you'll need to
# append to shadow file too with cpass2.pl"

@PASSWD=qx{cat $ARGV[0]};
foreach $line (@PASSWD) {
	($nick,$pass,$id,$group,$when,$restrict,$shell)=split(':',$line);
	print "$nick:x:$id:51:$when:\/site:\/etc\/ftponly\n";
}
