The Messenger of Allah ﷺ sent out an army and placed a man in command over them. The commander kindled a fire and ordered, "Enter it." Some people intended to enter it, while others said, "We only fled from the fire." The matter was mentioned to the Messenger of Allah ﷺ, and he said to those who had intended to enter it, "Had you entered it, you would have remained in it until the Day of Resurrection." To the others he spoke kindly. Abu Musa said in his version, he spoke good words to them. He also said, "There is no obedience in disobedience to Allah. Obedience is only in what is right."
أخبرنا محمد بن المثنى ومحمد بن بشار قالا حدثنا محمد قال حدثنا شعبة عن زبيد الإيامي عن سعد بن عبيدة عن أبي عبد الرحمن
أن رسول الله ﷺ بعث جيشا وأمر عليهم رجلا فأوقد نارا فقال ادخلوها فأراد ناس أن يدخلوها وقال الآخرون إنما فررنا منها فذكروا ذلك لرسول الله ﷺ فقال للذين أرادوا أن يدخلوها لو دخلتموها لم تزالوا فيها إلى يوم القيامة وقال للآخرين خيرا وقال أبو موسى في حديثه قولا حسنا وقال لا طاعة في معصية الله إنما الطاعة في المعروف
Bukhari narrated it in the Book of Reports from a Single Source, in the chapter on the permissibility of accepting the report of a single trustworthy narrator regarding the adhan and prayer, etc., hadith no. 7257, from Muhammad bin Bashshar. Muslim narrated it in the Book of Leadership, in the chapter on the obligation of obeying rulers except in disobedience, and the prohibition of obeying them in disobedience, hadith no. 1840, from Muhammad bin Muthanna, from the hadith of Muhammad bin Jafar Ghundar, through the same chain. It is also found in Al-Kubra, hadith no. 7828.