Shaykh Ibn Uthaymeen was asked,

Question:

“Oh virtuous Shaikh, after this speech about giving greetings, we want to know the manner of giving greetings to the one who greets us when we are in the washroom. What do we do?”

Answer:

“The one who is in the washroom does not give greetings until he exits. Yet, even if he is obligated to respond, then there is no way [for him] to reply to the greetings. If he signals [to his companion], he cannot see him, and if he speaks, then it is necessary that he does not mention Allah in this place. Rather, he waits until he exits. If his companion is still there, he returns the greeting to him, otherwise the reply drops from him [i.e. the obligation is removed from him]. This is because he was given greetings in a place where it is not allowed for him to return it”. End translation. [Liqaa ash-Shahri no. 13]

Translated by

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan