The Prophet ﷺ said to Kaab bin Ujra, "May Allah protect you from the rule of the foolish."Kaab asked, "What is the rule of the foolish?"He replied, "Rulers who will come after me. They will not follow my guidance and will not adhere to my sunnah. Whoever affirms their lies and assists them in their oppression, such people are not from me, nor am I from them, and they will not reach my pool. But whoever does not affirm their lies and does not assist them in their oppression, such people are from me, and I am from them, and they will reach my pool.Kaab bin Ujra, fasting is a shield, charity extinguishes sin, and prayer is a means of nearness," or he said, "a proof.Kaab bin Ujra, no flesh that has grown from unlawful earnings will enter Paradise. The Fire is more deserving of it.Kaab bin Ujra, people set out in the morning into two groups. One who buys his own soul and frees it, and another who sells his soul and ruins it."
حدثنا عبد الرزاق أخبرنا معمر عن ابن خثيم عن عبد الرحمن بن سابط
أن النبي ﷺ قال لكعب بن عجرة أعاذك الله من إمارة السفهاء قال وما إمارة السفهاء قال أمراء يكونون بعدي لا يقتدون بهديي ولا يستنون بسنتي فمن صدقهم بكذبهم وأعانهم على ظلمهم فأولئك ليسوا مني ولست منهم ولا يردوا علي حوضي ومن لم يصدقهم بكذبهم ولم يعنهم على ظلمهم فأولئك مني وأنا منهم وسيردوا علي حوضي يا كعب بن عجرة الصوم جنة والصدقة تطفئ الخطيئة والصلاة قربان أو قال برهان يا كعب بن عجرة إنه لا يدخل الجنة لحم نبت من سحت النار أولى به يا كعب بن عجرة الناس غاديان فمبتاع نفسه فمعتقها وبائع نفسه فموبقها
Its isnad is sahih. Haythami said in 10/231, "The narrators of Ahmad and Bazzar are the narrators of the Sahih." Ibn Khuthaym is Abdullah bin Uthman bin Khuthaym, and Abdul-Rahman bin Thabit is al-Ansari, and both are trustworthy. The hadith was narrated by Tirmidhi 2/513, number 614, in the Book of Prayer, chapter on the merit of prayer, and he said, "Hasan gharib." It was also narrated by Tabarani 19/106, and Ibn Hibban 378, number 1569, of al-Mawarid.