He did not hear it directly from him that the Messenger of Allah ﷺ passed by some men from the Ansar who were sitting in the road. He said, "If you must do so, then return the greeting of peace, help the wronged, and guide the lost traveler."
حدثنا محمود بن غيلان حدثنا أبو داود حدثنا شعبة عن أبي إسحق
ولم يسمعه منه أن رسول الله ﷺ مر بناس من الأنصار وهم جلوس في الطريق فقال إن كنتم لا بد فاعلين فردوا السلام وأعينوا المظلوم واهدوا السبيل
[Sahih] Ahmad also narrated it, 4/282, 291, 301, from the hadith of Shubah with this wording, and Israil corroborated him. Ibn Hibban graded it sahih, no. 1953. The hadith has corroborating narrations in Bukhari, no. 6229, 1421, and elsewhere.On this subject there is also a narration from Abu Hurairah [Abu Dawud, no. 4816, in abridged form, and Bukhari in Adab al-Mufrad, no. 1014], and from Abu Shurayh Khuzai [Ahmad, 6/385].