is it jus possible by altering d electrical connections
Maybe. It depends on the rotor. If the rotor is made of permenant magnets, simply rotating it will turn the motor into a dynamo and create electrical energy. However, many motors rely on electricity to create magnetic fields around the rotor, so there is going to have to be some feedback from the output back into the rotor circuit to generate the fields. However, this energy is going to be responcible for creating the output in the first place. Therefore, this would be an impossible design, since it would be essentially a perpetual motion machine. The electricity supplying the rotor coils would have to be input from an independant circuit. Perhaps linking a magnet driven electric motor to the rotor of the coil driven motor would work, but it would be highly inefficient unless the system was balanced precisely in terms of the energy flowing between the coil and the magnet based dynamo. Another approach might be to use solar cells to drive the rotor coils. I don't have any idea of how efficient this might be, but I suspect it is going to take fairly large sized cells to drive the rotor windings. Of course one last thing to concider is the fact dynamos and solar cells generate direct current. Most coil driven rotors operate off alternating current. The DC current would have to be transformed into AC current at 60 cycles per second at a voltage sufficient to drive the coils. DC to AC circuits are easy to build and if one can manage to generate 60 cycles per second, the construction of the coils on the rotor will take care of the rest. 60 CPS (cycles/second) is a universal design in power grids, and electric motors are designed around this standard.
An induction motor can be operated as a generator without rewiring. However it requires something external to the motor to supply magnetizing current. One way to supply the magnetizing current is to connect a capacitor across the motor terminals. The capacitor needs to be sized to suit the motor and the load.
At the Kinzua Dam in PA, they use the same machines to alternately pump water up to the holding lake during the night when electricity is cheap,(using the motor function) and during the day they let the water flow back down through the water wheels using it to generate electricity when they can sell it for more.
Oh guy I merely enjoyed jenifers answer - very functional! For the easy reason it incredibly is impossible to truly convert a single area induction motor to be a generator of useable electrical energy ...