Bahz bin Hakim narrates from his father, from his grandfather (may Allah be pleased with him), that the Messenger of Allah (peace and blessings be upon him) said: "Do you refrain from mentioning the wicked person?" He said: "Mention his faults, so that people may know him and beware of him."
This hadith is known through al-Jarud bin Yazid al-Naysaburi, and the scholars of hadith rejected it from him. Abu Abdullah Muhammad bin Ya'qub al-Hafiz said more than once: Whenever Abu Bakr al-Jarudi passed by the grave of his grandfather in the cemetery of al-Husayn bin Mu'adh, he would say: "O father, had you not narrated the hadith of Bahz bin Hakim, I would have visited you."
The Shaykh said: A group of weak narrators stole it from him and narrated it from Bahz bin Hakim, and nothing about it is authentic.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20914