By someone’s request, one of my old demonstration programs:
perl -nle 'setpwent;crypt($_,$c)eq$c&&print"$u=$_"while($u,$c)=getpwent' <dictfile
…works on Unixes without shadow files / with NIS, or with root privilege.
It’s hardly the most efficient way of doing a sweep for weak passwords, but there was a time where doing:
echo changeme | perl -nle ...cut-and-paste...
…was horrifyingly effective when given a NIS password map containing 30,000+ entries.
Happy now, Paul?