Language:
كتاب أخبار الآحاد
95  
Accepting Information Given by a Truthful Person
(1)
Chapter: Acceptance of the information given by one truthful person in about all matters
(1)
بَابُ مَا جَاءَ فِي إِجَازَةِ خَبَرِ الْوَاحِدِ الصَّدُوقِ فِي الأَذَانِ وَالصَّلاَةِ وَالصَّوْمِ وَالْفَرَائِضِ وَالأَحْكَامِ
Sahih al-Bukhari 7257

Narrated `Ali:

The Prophet (ﷺ) , sent an army and appointed some man their commander The man made a fire and then said (to the soldiers), "Enter it." Some of them intended to enter it while some others said, 'We have run away from it (i.e., embraced Islam to save ourselves from the 'fire')." They mentioned that to the Prophet, and he said about people who had intended to enter the fire. ''If they had entered it, they would have remained In it till the Day of Resurrection.'' Then he said to others, "No obedience for evil deeds, obedience is required only in what is good ."

حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ، حَدَّثَنَا غُنْدَرٌ، حَدَّثَنَا شُعْبَةُ، عَنْ زُبَيْدٍ، عَنْ سَعْدِ بْنِ عُبَيْدَةَ، عَنْ أَبِي عَبْدِ الرَّحْمَنِ، عَنْ عَلِيٍّ ـ رضى الله عنه ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم بَعَثَ جَيْشًا وَأَمَّرَ عَلَيْهِمْ رَجُلاً، فَأَوْقَدَ نَارًا وَقَالَ ادْخُلُوهَا‏.‏ فَأَرَادُوا أَنْ يَدْخُلُوهَا، وَقَالَ آخَرُونَ إِنَّمَا فَرَرْنَا مِنْهَا، فَذَكَرُوا لِلنَّبِيِّ صلى الله عليه وسلم فَقَالَ لِلَّذِينَ أَرَادُوا أَنْ يَدْخُلُوهَا ‏"‏ لَوْ دَخَلُوهَا لَمْ يَزَالُوا فِيهَا إِلَى يَوْمِ الْقِيَامَةِ ‏"‏‏.‏ وَقَالَ لِلآخَرِينَ ‏"‏ لاَ طَاعَةَ فِي مَعْصِيَةٍ، إِنَّمَا الطَّاعَةُ فِي الْمَعْرُوفِ ‏"‏‏.‏
Reference : Sahih al-Bukhari 7257
In-book reference : Book 95, Hadith 12
USC-MSA web (English) reference : Vol. 9, Book 91, Hadith 363
  (deprecated numbering scheme)