Leave the generator pulley on and keep the fan from turning by wedging a screwdriver in the slot in the pulley's back half (closest to the generator housing). You can then get a socket, extension and ratchet on the fan securing nut. This is easiest with the fan shroud removed from the engine with the generator still in place. On re-assembly, take care to correctly install the fan shims as they locate the fan in relation to the shroud.