#!/usr/local/bin/perl
open(PSWD, 'ypcat passwd|') || die("Can't read user database.");

while(<PSWD>)
{
	($username, @restline)=split(':', $_);
	push(@users, $username) if ( -d "/mnt/users/$username" );
}

close(PSWD);

print join("\n",sort(@users)),"\n";
