It wasnarrated that Abu Hurairah said:
"The Prophet (ﷺ) used toteachus not to bow or prostrate before the Imam; when he says theTakbirthen say the Takbir, and when he prostrates, you shouldprostrate." (JA)
English reference (JA): Vol. 1, Book 5, Hadith 960 (JA)
Arabic reference (JA): Book 5, Hadith 1013 (JA)