Question: Should Salaam be made upon entry into the masjid?
Answer: if one enters a Masjid and finds others busy in recitation of the Qur’ān and in Zikr, then it is undesirable (Makhrūh) for him to make Salām. If Salām is made, then it will not be mandatory (Wājib) for the brothers in the Masjid to reply. However, if there are some brothers who are sitting idle, then there is room for the permissibility of making Salām, on the condition that Salām is made in a manner that the other brothers are not disturbed. It will be permissible for the brothers sitting idle to reply.
If making Salām on entering the Masjid is not common, then it should be refrained from.
Fatawa Dārul Ulūm Zakariyyā, Vol. 4, Pg. 695