Praise be to Allah.
Abu Dawood (928), al-Haakim (927) and al-Bayhaqi (3411) narrated from Abu Hurayrah that the Prophet (blessings and peace of Allah be upon him) said: “There should be no uncertainty (ghiraar) and no greeting in prayer”.
Classed as saheeh by al-Albaani in as-Saheehah (318)
Abu Dawood said, after quoting this report:
Ahmad said: What it means, in my view, is that there should be no exchange of greetings, and a man may be uncertain about his prayer so he finishes it when he still has doubts about it (and that should not be the case).
Imam Ahmad (9622) narrated: ‘Abd ar-Rahmaan told us, from Sufyaan who said: I heard my father say: I asked Abu ‘Amr ash-Shaybaani about the words of the Prophet (blessings and peace of Allah be upon him), “There should be no ighraar in prayer” and he said: Rather the wording is: “There should be no ghiraar in prayer”. What is meant by ghiraar is: he should not exit the prayer thinking that there is something of it still left to be done, until he is completely certain that he has done everything required.
Al-Maawardi (may Allah have mercy on him) said:
What is meant is: there should be nothing missing from it, and that may be achieved if he acts upon what he is certain of (and completes his prayer). Then he will have removed any shortcomings from it.
End quote from al-Haawi (2/488).
Al-Khattaabi (may Allah have mercy on him) said:
The root meaning of the word ghiraar has to do with when a she-camel is lacking in milk. She is described as mughaar if her milk is too little. What is meant by the words “there should be no ghiraar” is there should be no shortcoming in the greeting. In other words, when you are greeted you should return the greeting in full, with no shortcoming in it. For example, if someone says “As-salaamu ‘alaykum wa rahmat-Allah (peace be upon you and the mercy of Allah),” you should say “ ‘Alaykum as-salaam wa rahmat-Allah”, and it you should not limit it to saying “as-salaamu ‘alaykum” or “wa ‘alaykum” only.
With regard to ghiraar (shortcomings) in prayer, it may be interpreted in two ways: the first of which is not doing the bowing and prostration properly, and the second is being uncertain as to whether one has prayed three or four rak‘ahs, so he goes by the greater number and ignores what is certain, and finishes the prayer with some doubt. However the Sunnah, according to the report of Abu Sa‘eed al-Khudri, is that one should deal with uncertainty by proceeding on the basis of what is certain, and therefore pray a fourth rak‘ah so that one may be sure that one has completed four.
End quote from Ma‘aalim as-Sunan (1/219-220)
An-Nawawi (may Allah have mercy on him) said:
According to a report narrated by al-Bayhaqi, it says “There should be no ghiraar in the prayer (as-salaah)”, with the definite article. Al-Bayhaqi said: This is closer to the interpretation of Ahmad. According to another report narrated by al-Bayhaqi: “There should be no ghiraar (shortcoming) in greeting or in prayer.” This supports the interpretation of al-Khattaabi. Al-Bayhaqi said: The reports quoted above give permission to greet the one who is praying and for him to respond with a gesture, and that is more appropriate to follow.
End quote from Majmoo‘ Sharh al-Muhadhdhab (4/104)
Ibn al-Atheer (may Allah have mercy on him) said:
Ghiraar means shortcoming. Ghiraar an-nawm means lack of sleep. What is meant by ghiraar as-salaah is shortcoming in the way it is done and shortcoming in its essential parts. Ghiraar at-tasleem (shortcoming in greeting) means that the one who is responding to a greeting says “wa ‘alayka (and also upon you)” without saying “as-salaam”. And it was said that what is meant by ghiraar is sleep, i.e., there should be no sleeping in prayer. The word tasleem (greeting) has been narrated in the nominative and in the genitive (in various reports). Where it is mentioned in the genitive, it is paired with the word prayer (so the meaning is that there should be no shortcoming in prayer or in greeting), as mentioned above. Where it is mentioned in the nominative, then it is paired with the word ghiraar, so the meaning is that there should be no shortcoming or greeting in prayer, because saying words in prayer that are not part of the prayer is not permissible.
End quote from an-Nihaayah (3/661)
From the words of the scholars quoted above, we may conclude that the words of the Prophet (blessings and peace of Allah be upon him), “There should be no ghiraar in prayer” mean: the worshipper should not exit the prayer when he is uncertain about it; rather he should exit the prayer when he is certain he has done it completely and properly. If he is uncertain as to whether he has fallen short, he should continue on the basis of the lesser number (of rak‘ahs) until he is certain that there is no shortcoming in his prayer. Muslim (571) narrated that Abu Sa‘eed al-Khudri said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “If one of you is unsure when praying and does not know how many (rak‘ahs) he has prayed, whether it is three or four, let him ignore what is uncertain and proceed on the basis of what is certain, then let him prostrate twice before saying the tasleem. Then if he has prayed five (rak‘ahs), that will make his prayer even, and if he has prayed it properly with four, it will annoy the Shaytaan.”
Part of shortcoming in prayer is not bowing and prostrating properly, and not doing the prayer at a comfortable pace, because these are shortcomings in the prayer. The worshipper should be at ease and do the prayer at a comfortable pace, bowing and prostrating properly.
To sum up: he should do his prayer in the proper manner, without any kind of shortcoming.
With regard to the words “and no greeting (tasleem)”, this has been narrated in the nominative and in the genitive (in various reports). Where it is mentioned in the genitive, it is paired with the word prayer (so the meaning is that there should be no shortcoming in prayer or in greeting), so there should be no shortcoming in the greeting; rather one should give the greeting its due in full and if his Muslim brother greets him with salaam, he should respond with a better greeting or one that is similar.
Where it is mentioned in the nominative, then it is paired with the word ghiraar, so the meaning is that there should be no shortcoming or greeting in prayer. Therefore the one who is praying should not greet anyone or be greeted, lest that distract him from his prayer. If anyone does greet him with salaam, he should respond with a gesture. Perhaps the first interpretation is more appropriate.
See also the answer to question no. 114225
And Allah knows best.