Inorder to improve performance magento 'caches' object, so when trying to load an object in a loop you either need to load a new instance or call it reset() method
$website_id = Mage::app()->getWebsite()->getId();
foreach($entityRowsIn as $idx => $u){
$cust = Mage::getModel('customer/customer');
$cust->setWebsiteId($website_id);
$cust->loadByEmail($u['email']);
$cust->setPassword($cust->generatePassword(8));
$cust->save();
$cust->sendNewAccountEmail(); // if you are getting 2 email then remove this line
}
If you are load a large number of customers then you may run in to memory issues and my need to look a other technique using reset()
If this code is being run from the Administration section of Magento then you will need to make sure that you set the correct Website ID ( Mage::app()->getWebsite()->getId()
will return the incorrect one ).
From the front end this code will work fine but for Admin work you should use '1' or whatever your Front end websites ID is as the getId() method was returning '0' in the Admin area! Small gotcha but had me going for hours!