عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ لِيُسَلِّمِ الرَّاكِبُ عَلَى الْمَاشِي وَالْمَاشِي عَلَى الْقَاعِدِ وَفِي رِوَايَةٍ أَوِ الْمَارُّ بَدَلَ الْمَاشِي وَالْقَلِيلُ عَلَى الْكَثِيرِ زَادَ فِي رِوَايَةٍ وَالصَّغِيرُ عَلَى الْكَبِيرِ
Sayyiduna Abu Huraira (may Allah be pleased with him) narrates that the Noble Prophet (peace and blessings be upon him) said: The rider should greet the one who is walking, the one who is walking (in one narration: the one passing by) should greet the one who is sitting, and those who are fewer in number should greet those who are greater in number. One narration adds: and the younger should greet the elder.