According to Abu Dawud and Tirmidhi’s accounts from Ibn Masud, Rasulullah (saas) said: “His name will be compatible with mine, and his father’s name with my father’s name...”1
“Even if only one day is left to the life of this world, Allah will certainly prolong that day until the coming of a man [Hazrat Mahdi (as)] from the Ahl al-Bayt whose name is compatible with mine.” –narrated in Ahmad Ibn Hanbal’s Musnad.
According to Abdullah Ibn Umar’s (ra) account;
Rasulullah (saas) said: “The world will not come to an end until a man from my Ahl al-Bayt [Hazrat Mahdi (as)] whose name is compatible with mine imposes his rule over all the Arabs.”
According to another account, he said:
“Even if only one day remains from the life of this world, Allah will certainly prolong that day until He sends a man from my Ahl al-Bayt [Hazrat Mahdi (as)] whose name is compatible with mine. He will fill the world that was previously filled with cruelty and oppression with truth and justice instead.” –related by Tirmidhi, Abu Dawud, Nasai, Bayhaqi and Abu Amr Ad-Dani.
Again according to Abdullah Ibn Umar (ra) he said:
“The world will not come to an end until a man from my Ahl al-Bayt whose name is compatible with mine establishes dominion (on earth). He will fill the world that was previously filled with cruelty and oppression, with truth and justice instead.” – Related in Abu al-Qasim Sulaiman ibn Ahmad ibn At-Tabarani “al- Mu’jam As-Saghir.” In addition, Tirmidhi’s “Al-Jami” and Abu Dawud’s “Sunan” by and large repeat this account, with a few minor alterations.
 Portents of Doomsday, Expanded 9th Edition, pp. 159-160
The hadith emphasize that these names will be “compatible with one another.” In other words, one must not expect Hazrat Mahdi (as) to be directly called “Ahmad or Muhammad,” nor his father to go by the name of “Abdullah.” (Allah knows the truth.)
Ahmad Muhammad Hazrat Mahdi (as) is the name Allah gives to one who will come in the End Times. Rasulullah (saas) has reported that name. In other words, his birth name will not be “Ahmad Muhammad Mahdi.” This is a name given him by Allah. Our Prophet (saas) does not say “his name will be the same as mine” in the hadith; he says “it will be compatible with mine.” In the same way, he says, “His father’s name will be compatible with my father’s name.” There is a sign and a secret in this.
We must also consider this. If someone does not want the children in his family to be Hazrat Mahdi (as) he can supposedly prevent their being Hazrat Mahdi (as) by giving them another name. In the same way, he can supposedly guarantee that his son will be Hazrat Mahdi (as) by calling him “Ahmad Muhammad.” That is obviously totally illogical. Allah has selected the person He wishes in destiny and has given him the name “Ahmad Muhammad Mahdi.” Some being given or not being given that name cannot change situation in the slightest.