If you can't boot into Safe Mode OR Single-User Mode:
Try this first:
if you have another computer on the same network, or you can physically connect another computer by firewire or Ethernet, and you have file sharing turned on, or screen sharing turned on, you can a) take control using screen sharing and use the other computer's mouse/kb, or go into the filesystem of your iMac from this connected machine and (i imagine you moved a kernel extension, possibly IOUSBFamily.kext?) restore/replace the files you altered.
If that doesn't work...
This is a bit heavy, but should work:
Take out HDD
Put HDD into external enclosure/dock/adapter
turn on iMac and immediately insert the original install disc or a retail install disc that is not older than the system software that shipped with your computer.
plug in mouse/keyboard, wait for command prompt.
plug in hard drive.
now you should be able to go in and edit the files on the HDD you took out that is now plugged in externally, FireWire or USB, by using the Terminal program to turn USB back on (by undoing whatever you did). I'm not going to give you a crash course on Terminal here, but look at This . You'll need at the very least the command mv
or cp
and you'll likely want to preface these with sudo
.
Finally, you could always reinstall once the drive is out or, or install a new copy onto a usb drive, assuming the HDD is out, then plug the HDD back in once you've booted up, and work from my first suggestion.
How did you disable the USB ports? Which method? – JoshP – 2012-07-09T12:34:44.593
Have you tried booting into Safe Mode? – None – 2012-07-09T19:23:36.260