It is reported on the authority of Abu Dharr that he heard the Messenger of Allah (may peace and blessings be upon him) saying
No person who claimed knowingly anyone else as his father besides (his own) committed nothing but infidelity, and he who made a claim of anything, which (in fact) did not belong to him, is not amongst us; he should make his abode in Fire, and he who labeled anyone with unbelief or called him the enemy of Allah, and he was in fact not so, it rebounded on him.
It is narrated on the authority of Abu Huraira that the Messenger of Allah (may peace and blessings be upon him) observed
Do not detest your fathers; he who detested his father committed infidelity.
It is reported on the authority of Sa'd b. Abi Waqqas
Both of my ears heard the Messenger of Allah saying this: He who claimed the fatherhood of anyone else besides his real father knowingly (committed a great sin) ;Paradise is forbidden to him. Abu Bakra asserted that he too heard it from the Messenger of Allah (may peace be upon him ).
Sa'd and Abu Bakra each one of them said
My ears heard and my hearing preserved it that Muhammad (peace and blessings be upon him) observed: He who claimed for another one his fatherhood besides his own father knowingly that he was not his father-to him Paradise is forbidden.