I have had the random shut down problem for months, however, thing were fine for 2.5 years previously. I have an Imac G5 made in June 2005, and I believe my problem was due to over heating. I finally discovered this...there is a "?program?" in your imac called the SMU, the System Management Unit. The SMU controls everything electrical in your computer, all power routing. You can reset the SMU in my computer by unplugging all cables from the computer and then removing the power plug in the back for ten seconds or so and then when you plug the power cord back in, simultaneously hold down the start up button. Once plugged in let go of the start up button. Plug back in your other cables and hit the start button again. Since doing this the computer has worked properly under stress for the past 72 hours, ie., internet always on, all programs opened, repeated sleep/wake cycles, etc. I believe that a fan or fans were not working for whatever reason, and that the machine overheated and shut itself off, and that by resetting the SMU it put the cooling system back on track. You can find out more about resetting the SMU at
http://support.apple.com/kb/HT1767 You can probably find a way to similar info for your imac if not like mine from that site. Of course, as soon as I send this the
** thing will shut down....hahahaha. The worst thing about this is the complete and total silence from Apple, and it will be quite sometime before I buy another Imac. Good luck.