When the Prophet ﷺ passed by al-Hijr, he said, "Do not enter the dwellings of those who wronged themselves, lest there befall you what befell them, unless you are weeping." Then he covered his head and hastened his pace until he had crossed the valley.
لما مر النبي ﷺ بالحجر قال: لاتدخلوا مساكن الذين ظلموا أنفسهم أن يصيبكم ما أصابهم إلا أن تكونوا باكين ثم قنع رأسه وأسرع السير حتى أجاز الوادي.
Bukhari narrated it in the Book of Military Expeditions (4419) and Muslim in the Book of Asceticism (2980), both of them through Zuhri, from Salim, from Ibn Umar, who said, and then he related it.Then Bukhari mentioned, with a suspended chain, a narration from Sabra bin Mabad, Abu Shamus, and Abu Dharr. I say, the sahih one among them is the hadith of Sabra bin Mabad, which is the one that follows, while the hadith of Abu Shamus and the hadith of Abu Dharr are both daif.