371: Giving salaams to people in the mosque during the khutbah

Is it the sunnah to say assalaamu 'alaykum
out loud when entering the masjid (while others are praying or during the khutbah) ?
Please advise the daleel. Jazzakallhu Khayrun

The author of Zaad al-Mustanfi said it is
permissible for the imaam to greet the congregation with salaam when he faces them. Shaykh
Ibn Uthaymeen said, in his interesting comment, that this is because this practice
was reported from the Prophet
(peace and blessings of Allaah be upon him). Even
though there is some weakness in this hadeeth (i.e. in its isnaad), this is what the ummah
has done and it is well known that when the imaam comes and gets up on the minbar, he
greets the people with salaam. (Reported by al-Shubi). Abu Bakr and Umar used
to do this. Reported by Abd al-Razzaaq , Ibn Abi Shaybah, 2/114, Ibn Maajah and
al-Tabaraani. It was also reported by al-Bayhaqi from Jaabir ibn Umar, narrating
from the Prophet
(peace and blessings of Allaah be upon him), then he said: a report
concerning this was narrated from Ibn Abbaas from Umar ibn Abd
al-Azeez. Then the shaykh said in his commentary: it is not permitted to speak when
the imaam is delivering the khutbah, it is only permitted before and after the khutbah,
even after the khateeb has arrived and after the adhaan, so long as the khateeb has not
started his khutbah. (Ibn Uthaymeen, Al-Sharh al-Muttabi li Zaad
al-Mustanfi, 5/78). [?? Makath ??] is well known, from which we know that it is
obligatory to return the greeting of salaam, so in this case we understand that it is not
forbidden to speak. And Allaah knows best.

Ibn Qudaamah said in al-Mughni: When the imaam faces the
people, he greets them with salaam and they respond, then he sits down. Then he
mentioned the hadeeth quoted above, and others. Then he said (may Allaah have mercy on
him): When he greets them with salaam, the people should respond, because it is more
of an obligation to return the greeting than to initiate it. Then he should sit down and
rest until the muadhdhinoon (muezzins) finish. (al-Mughni 2/297). And
Allaah knows best. May Allaah bless our Prophet Muhammad and his family.