Qabisa bin Zuayb reported,

The grandmother came to Abu Bakr al-Siddiq asking him for her inheritance. Abu Bakr said to her, "There is nothing for you in the Book of Allah, and I do not know of anything for you in the Sunnah of the Messenger of Allah ﷺ. Go back until I ask the people."So he asked the people, and Mughira bin Shuba said, "I was present with the Messenger of Allah ﷺ when he gave her a sixth."Abu Bakr asked, "Is there anyone else with you who can confirm this?"Then Muhammad bin Maslama al-Ansari stood up and said the same as what Mughira bin Shuba had said, so Abu Bakr granted it to her.Later, the other grandmother, on the father's side, came to Umar asking him for her inheritance. He said, "There is nothing for you in the Book of Allah, and the ruling that was given was only for someone other than you, and I will not add anything to the obligatory shares. But there is that same sixth. If the two of you are together in it, it is shared between you, and whichever of you is alone with it, it belongs to her."

Ibn Majah 2724

Sahih

حدثنا أحمد بن عمرو بن السرح المصري أنبأنا عبد الله بن وهب أنبأنا يونس عن ابن شهاب حدثه عن قبيصة بن ذؤيب ح و حدثنا سويد بن سعيد حدثنا مالك بن أنس عن ابن شهاب عن عثمان بن إسحق بن خرشة

عن قبيصة بن ذؤيب قال

جاءت الجدة إلى أبي بكر الصديق تسأله ميراثها فقال لها أبو بكر ما لك في كتاب الله شيء وما علمت لك في سنة رسول الله ﷺ شيئا فارجعي حتى أسأل الناس فسأل الناس فقال المغيرة بن شعبة حضرت رسول الله ﷺ أعطاها السدس فقال أبو بكر هل معك غيرك فقام محمد بن مسلمة الأنصاري فقال مثل ما قال المغيرة بن شعبة فأنفذه لها أبو بكر ثم جاءت الجدة الأخرى من قبل الأب إلى عمر تسأله ميراثها فقال ما لك في كتاب الله شيء وما كان القضاء الذي قضي به إلا لغيرك وما أنا بزائد في الفرائض شيئا ولكن هو ذاك السدس فإن اجتمعتما فيه فهو بينكما وأيتكما خلت به فهو لها

ابن ماجه 2724صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Obligatory duties
Chapter
Inheritance of the grandmother
Numbering
Darussalam 2724
Ibn Majah 2724