The Messenger of Allah ﷺ addressed us at Mina while seated on his mount, which was chewing its cud, its saliva flowing between its shoulders. He said, "Allah has assigned to each person his share of inheritance, so no bequest may be made in favor of an heir. The child belongs to the marriage bed, and the adulterer gets the stone. Whoever claims descent from someone other than his father, or attaches himself as a client to people other than his own out of dislike for them, upon him is the curse of Allah, the angels, and all of humanity."Ibn Jafar said, and Saeed said, that Matar said, "Neither obligatory nor voluntary worship will be accepted from him."Yazid said, and in his version, "Neither obligatory nor voluntary worship will be accepted from him," or "neither voluntary nor obligatory worship."Ubayy said, Yazid said in his narration that Amr bin Kharija reported to them that the Prophet ﷺ addressed them while on his mount.
حدثنا محمد بن جعفر حدثنا سعيد ويزيد بن هارون أخبرنا سعيد عن قتادة عن شهر بن حوشب عن عبد الرحمن بن غنم
خطبنا رسول الله ﷺ بمنى وهو على راحلته وهي تقصع بجرتها ولعابها يسيل بين كتفي فقال إن الله عز وجل قسم لكل إنسان نصيبه من الميراث فلا يجوز لوارث وصية الولد للفراش وللعاهر الحجر ألا ومن ادعى إلى غير أبيه أو تولى غير مواليه رغبة عنهم فعليه لعنة الله والملائكة والناس أجمعين قال ابن جعفر وقال سعيد قال مطر لا يقبل منه صرفا ولا عدلا قال يزيد وفي حديثه لا يقبل منه صرف ولا عدل أو عدل ولا صرف قال أبي قال يزيد في حديثه إن عمرو بن خارجة حدثهم أن النبي ﷺ خطبهم على راحلته
Its chain is hasan due to Shahr bin Hawshab, and the hadith previously appeared at 17595 with the same chain and text. It is found in Bukhari with similar wording at 12/27, no. 6818 Fath, and in Abu Dawud, no. 2274.