I highly doubt Orochimaru turned good.
This^
oruchimaru is the only villain in the series
And This^
OT: Rin was just the tip of the iceberg.
Obito- Seeing Kakashi run her through after he died protecting him and making kakashi promise to look after her and protect (Promises broke by close friends) Madara's manipulation (cohersion)...these are all part of the reason that make the whole reason why Obito is what he is.
Madara- The shinobi system, his past traumas of his brothers' deaths, always being 1 step behind Hashirama. These are what made Madara what he is.
Orochimaru-Parents death, the shinobi system, and....well...He's a snake
Kabuto-No identity to call his own, being forced into becoming a shinobi for the sake of Mother and his family of friends at the orphanage, Orochimaru and Danzo's cohersion. This is what made him what he is.
Nagato- Cohersed by Obito, Kanoha ninjas killed his parents, the shinobi system, being born in a war torn country, Yahiko being killed. This is what made him what he was.
None of the people you mentioned became villians for any 1 reason. Like any villian it is the sum of the past tragedies and hardships that made them this way.