Narrated Hani ibn Yazid: 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 Abu Shurayh. 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.
´It was narrated from Shuraih bin Hani' from his father, that:` When he came to the Messenger of Allah [SAW] and he heard them calling Hani' by the nickname of Abu Al-Hakam, the Messenger of Allah [SAW] called him and said to him: "Allah is Al-Hakam (the Judge) and judgment is His. Why are you known as Abu Al-Hakam?" He said: "If my people differ concerning something, they come to me, and I pass judgment among them, and both sides accept it." He said: "How good this is. Do you have any children?" He said: "I have Shuraih, and 'Abdullah, and Muslim." He said: "Who is the eldest of them?" He said: "Shuraih." He said: "Then you are Abu Shuraih," and he supplicated for him and his son.
Hafiz Muhammad Ameen
(1) From this blessed hadith, it is indicated that a correct and sound decision made by an arbitrator should be enforced, because the Messenger of Allah (sallallahu alayhi wa sallam) praised the action of Hani (radi Allahu anha).
(2) It is recommended (mustahabb) to adopt a kunya (patronymic) after the name of the eldest son, because due to being the eldest, this is his right.
(3) From this blessed hadith, it is also understood that changing an ugly or bad name is a recommended and desirable act in the Shari‘ah. Furthermore, this blessed hadith also guides towards the issue that one should avoid adopting the kunya “Abu al-Hakam,” because in Arabic, “hakam” means one who judges or decides. “Abu al-Hakam” means the greatest judge or decision-maker. Clearly, this expresses pride and arrogance, which the Shari‘ah does not deem appropriate; therefore, the Prophet (sallallahu alayhi wa sallam) changed this kunya to a real kunya.
(4) “This is a very good thing.” The literal meaning of the Arabic phrase is: “There is nothing better than this.” The meaning is the same.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 5389