It is narrated from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Do not boast about your forefathers who passed away in the Jahiliyyah (the pre-Islamic era of ignorance). By the One in whose Hand is my soul, the filth that the dung beetle (the dung insect) rolls along with its nostrils is better than your forefathers who passed away in the Jahiliyyah."
Abu Hatim al-Busti (may Allah have mercy on him) narrated it from Muhammad bin Ishaq (the freed slave of Thaqif) (may Allah have mercy on him), from Harun bin Abdullah al-Hammal (may Allah have mercy on him), from Abu Dawud al-Tayalisi (may Allah have mercy on him).
And Sufyan bin Uyaynah (may Allah have mercy on him) narrated it from Ayyub, from Ikrimah (may Allah have mercy on him), that the Prophet (peace and blessings be upon him) said it, and he did not mention Sayyiduna Ibn Abbas (may Allah be pleased with them both) in it.