According to Imam Nawawl, greeting with the words of as-Salam-u-‘Alaikum is a Sunnah, and responding to it is Wajib (obligatory), but this essentiality is of the nature of Kifaya, meaning thereby that if a few persons out of the whole assembly or group respond to the greeting it will absolve all of the responsibility of response but if no response comes forth from any quarter all are held responsible for it.
Abu Huraira reported Allah’s Messenger (may peace be upon him) as saying: The rider should first greet the pedestrian, and the pedestrian the one who is seated and a small group should greet a larger group (with as-Salam-u-‘Alaikum).
Book 026, Number 5374
Abu Huraira reported Allah’s Messenger (may peace be upon him) as saying: Six are the rights of a Muslim over another Muslim. It was said to him: Allah’s Messenger, what are these? Thereupon he said: When you meet him, offer him greetings;when he invites you to a feast accept it. when he seeks your council give him, and when he sneezes and says:” All praise is due to Allah,” you say Yarhamuk Allah (may Allah show mercy to you) ; and when he fails ill visit him; and when he dies follow his bier.
Book 026, Number 5374
ma sha Allah, beautiful hadiths and a great reminder…