Well since it was Zetsu who brought Obito to Madara, I believe Zetsu was watching them. Also I'm sure Zetsu knew about the famous 4th Hokage and his students. Madara needed a successor so I'm sure he kept tabs on everyone in the village, remember Zetsu's can transform into people and no one will notice their true form, with the exception of Naruto.