The freed slave of Sayyiduna Ibn Abbas (may Allah be pleased with them both), Hazrat Umair (may Allah have mercy on him), narrates that I and Abdullah bin Yasar, the freed slave of the noble wife of the Prophet (peace be upon him), Sayyida Maymunah (may Allah be pleased with her), came until we presented ourselves before Sayyiduna Abu Juhaim bin Harith bin Simmah Al-Ansari (may Allah be pleased with him). Abu Juhaim (may Allah be pleased with him) said that the Messenger of Allah (peace be upon him) came from the direction of the well of Jamal, and a man met him and greeted him with salam. The Messenger of Allah (peace be upon him) did not reply to his salam until he came to a wall, struck his hands on the wall, wiped his face and hands, and then replied to his salam.
Explanation & Benefits
Shaykh Muhammad Farooq Rafi
Benefits:
➊ Returning the greeting of salam while urinating or defecating is disliked (makruh), and a person in this state should not be greeted with salam.
➋ Ablution (wudu) is obligatory only for prayer; purity is not a condition for remembrance (dhikr). But making remembrance and returning the salam while in a state of ablution, or by deliberately performing dry ablution (tayammum) despite the availability of water, is a recommended act.
➌ Performing tayammum with a wall etc. is permissible; furthermore, performing tayammum for returning the salam in the presence of water is permissible. Apart from this, for voluntary and obligatory prayers or other rulings where ablution is obligatory, performing tayammum without an excuse in the presence of water is not permissible.
Source: Sahih Ibn Khuzaymah: Commentary by Muhammad Farooq Rafee, Page: 274