صحيح البخاري Sahih Bukhari كتاب الأذان The Book of Adhan
بَابُ إِمَامَةِ الْمَفْتُونِ وَالْمُبْتَدِعِ:

(56) Chapter. Offering prayers behind a man who is a victim of Al-Fitan (trials and afflictions) or a heretic.

2 hadith
Hadith 695
قَالَ أَبُو عَبْد اللَّهِ : وَقَالَ لَنَا : مُحَمَّدُ بْنُ يُوسُفَ ، حَدَّثَنَا الْأَوْزَاعِيُّ ، حَدَّثَنَا الزُّهْرِيُّ ، عَنْ حُمَيْدِ بْنِ عَبْدِ الرَّحْمَنِ ، عَنْ عُبَيْدِ اللَّهِ بْنِ عَدِيِّ بْنِ خِيَارٍ ، أَنَّهُ دَخَلَ عَلَى عُثْمَانَ بْنِ عَفَّانَ رَضِيَ اللَّهُ عَنْهُ وَهُوَ مَحْصُورٌ ، فَقَالَ : إِنَّكَ إِمَامُ عَامَّةٍ ، وَنَزَلَ بِكَ مَا نَرَى ، وَيُصَلِّي لَنَا إِمَامُ فِتْنَةٍ وَنَتَحَرَّجُ ، فَقَالَ : " الصَّلَاةُ أَحْسَنُ مَا يَعْمَلُ النَّاسُ ، فَإِذَا أَحْسَنَ النَّاسُ فَأَحْسِنْ مَعَهُمْ ، وَإِذَا أَسَاءُوا فَاجْتَنِبْ إِسَاءَتَهُمْ " ، وَقَالَ الزُّبَيْدِيُّ : قَالَ الزُّهْرِيُّ : لَا نَرَى أَنْ يُصَلَّى خَلْفَ الْمُخَنَّثِ إِلَّا مِنْ ضَرُورَةٍ لَا بُدَّ مِنْهَا .
Narrated 'Ubaid-Ullah bin Adi bin Khiyar: I went to 'Uthman bin Affan while he was besieged, and said to him, "You are the chief of all Muslims in general and you see what has befallen you. We are led in the Salat (prayer) by a leader of Al-Fitan (trials and afflictions etc.) and we are afraid of being sinful in following him." 'Uthman said. "As-Salat (the prayers) is the best of all deeds so when the people do good deeds do the same with them and when they do bad deeds, avoid those bad deeds." Az-Zuhri said, "In our opinion one should not offer Salat behind an effeminate person unless there is no alternative."
Hadith Reference Sahih Bukhari / The Book of Adhan / Hadith: 695
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 696
حَدَّثَنَا مُحَمَّدُ بْنُ أَبَانَ ، حَدَّثَنَا غُنْدَرٌ ، عَنْ شُعْبَةَ عَنْ أَبِي التَّيَّاحِ ، أَنَّهُ سَمِعَ أَنَسَ بْنَ مَالِكٍ ، قَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لِأَبِي ذَرٍّ : "اسْمَعْ وَأَطِعْ وَلَوْ لِحَبَشِيٍّ كَأَنَّ رَأْسَهُ زَبِيبَةٌ " .
Narrated Anas bin Malik: The Prophet said to Abu-Dhar, "Listen and obey (your chief) even if he is an Ethiopian with a head like a raisin."
Hadith Reference Sahih Bukhari / The Book of Adhan / Hadith: 696
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة