The Messenger of Allah ﷺ said, "Abu Dharr, there will be rulers..." and he mentioned the rest of the hadith.
حدثنا حسين حدثنا المبارك حدثني أبو نعامة حدثني عبد الله بن الصامت أن
له قال رسول الله ﷺ يا أبا ذر إنها ستكون أئمة فذكر الحديث
Its chain of transmission is sahih.