Scoochy is correct, IFF didn't exist back then. Radar was simple during those times, radio wave shoots out, radio wave bounces off radio-bouncable object, radar reciever picks up bounced wave.
Simple, yet effective. Of course, ships didn't have guided missiles back then, so having no IFF was not a big deal, since you would have to get close enough to a vessel to see it in order to attack it, and by this time you'd be able to see whether it was a friendly or not.
There was always radio communication too, though if you radio an enemy vessel asking them if they are friendlies... well, you've just boned yourself then.