Ubayy reported that the Prophet ﷺ said, "Do not turn away from your fathers, for whoever turns away from his father has committed an act of disbelief."
عن النبي ﷺ قال: لا ترغبوا عن آبائكم، فمن رغب عن أبيه فهو كفر.
Bukhari reported it in the Book of Inheritance (6768), and Muslim in the Book of Faith (62), both from the hadith of Ibn Wahb, who said, Amr told me, from Jafar bin Rabia, from Arak bin Malik, from Abu Hurairah, who mentioned it, and their wording is the same.