iOS4 update error 21 on mac with 3g - solution
*Create a new user account on your mac (I called mine temp), make sure it has administrator privileges
*Log in to the account, sync and update your iPhone with the latest version of iTunes
*Once it's done & updated to iOS4, rename the phone to match your usual account name (e.g. I changed mine from Temp's iPhone, to Rick's iPhone.
*Sync again
*Log back in to your usual user account & restore your phone.
Hope that helps - I spent hours scratching my head about it!
Rick
mac pro, macbook pro, macbook (all intel), iPhone 3g, iOS 4