Mishkat al-Masabih
The Offices of Commander and Qadi — Hadith #3546
وَعَن المقدامِ بن معْدي كِربَ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ضَرَبَ عَلَى مَنْكِبَيْهِ ثُمَّ قَالَ: «أَفْلَحْتَ يَا قُدَيْمُ إِنْ مُتَّ وَلَمْ تَكُنْ أَمِيرًا وَلَا كَاتبا وَلَا عريفا» . رَوَاهُ أَبُو دَاوُد
Al-Miqdam b. Ma’dikarib told that God’s Messenger struck him on his shoulders and then said, “You will attain success, Qudaim,* if you die without having been a ruler, a secretary, or a chief.”
Abu Dawud transmitted it.
* This form is used as a diminutive of Miqdam, the diminutive being used as an affectionate form of address.