Well, that would be pretty unfortunate, but they should know that it's their friend who is spamming, and if it's serious, like spamming porn, well, that's not exactly the best friend.
Anyway, I'm sure there could be a way to get around that. For example, the original account will not be banned automatically, but they can't make any new accounts. Then, the original spammer/troll/hacker can be manually banned by a mod. That way, the good account stays, the trolls are out.
Banning IP addresses will keep all these tons of alt account trolls from returning (unless they're REALLY determined and use a different computer, but that still wouldn't last long). It could cut down the troll population by 90% I'll bet.