It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: "The rider should greet the one who is walking, the one who is walking should greet the one who is sitting, and the smaller group should greet the larger group."