When Hani went with his people in a deputation to the Messenger of Allah ﷺ, he heard them calling him by his kunyah (surname), AbulHakam. So the Messenger of Allah ﷺ called him and said: Allah is the judge (al-Hakam), and to Him judgment belongs. Why are you given the kunyah AbulHakam? He replied: When my people disagree about a matter, they come to me, and I decide between them, and both parties are satisfied with my decision. He said: How good this is! What children have you? He replied: I have Shurayh, Muslim and Abdullah. He asked; Who is the oldest of them? I replied: Shurayh. He said: Then you are AbuShurayh. Abu Dawud said: This is Shuraib who broke the chain, and who entered Tustar. Abu Dawud said: I have been told that Shuraib broke the gate of Tustar, and he entered it through tunnel.
أَنَّهُ لَمَّا وَفَدَ إِلَى رَسُولِ اللَّهِ ﷺ مَعَ قَوْمِهِ سَمِعَهُمْ يَكْنُونَهُ بِأَبِي الْحَكَمِ فَدَعَاهُ رَسُولُ اللَّهِ ﷺ فَقَالَ إِنَّ اللَّهَ هُوَ الْحَكَمُ وَإِلَيْهِ الْحُكْمُ فَلِمَ تُكْنَى أَبَا الْحَكَمِ فَقَالَ إِنَّ قَوْمِي إِذَا اخْتَلَفُوا فِي شَىْءٍ أَتَوْنِي فَحَكَمْتُ بَيْنَهُمْ فَرَضِيَ كِلاَ الْفَرِيقَيْنِ فَقَالَ رَسُولُ اللَّهِ ﷺ مَا أَحْسَنَ هَذَا فَمَا لَكَ مِنَ الْوَلَدِ قَالَ لِي شُرَيْحٌ وَمُسْلِمٌ وَعَبْدُ اللَّهِ قَالَ فَمَنْ أَكْبَرُهُمْ قُلْتُ شُرَيْحٌ قَالَ فَأَنْتَ أَبُو شُرَيْحٍ