The Prophet ﷺ said, "Whoever claims descent from someone other than his father will not even catch the scent of Paradise, though its fragrance can be perceived from a distance of seventy years' travel."
عن النبي ﷺ: من ادعى إلى غير أبيه لم يرح رائحة الجنة، وإن ريحها ليوجد من مسيرة سبعين عاما.
Ahmad (6592) and Tayalisi (2388) both narrated it through the route of Shubah, from Hakam, from Mujahid, from Abdullah bin Amr, who related it, and its chain is sahih. Ibn Majah (2611) narrated it from Muhammad bin Sabbah, who said, "Sufyan informed us, from Abdul-Kareem, from Mujahid," with this wording, "five hundred years."Abdul-Kareem was not mentioned with his lineage specified, so it is possible he is Ibn Abu Makhariq, who is daif, since he was among the teachers of Sufyan and the students of Mujahid. It has also been said that he is Jazari, who is trustworthy. In any case, the wording "five hundred years" is not the preserved version, while "seventy years" is the preserved wording, and it is supported by the other hadiths.As for the variation among the narrations in mentioning forty, seventy, or a hundred, this may be due to the difference in the smell itself, its strength, and its lightness. Iraqi said, "Reconciling these narrations depends on the difference among the individuals concerned, according to the variation in their ranks and degrees." (See Fath al-Bari 12/260)