Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnhibban:3947al-Naḍr b. Muḥammad b. al-Mubārak > Muḥammad b. ʿUthmān al-ʿIjlī > ʿUbaydullāh b. Mūsá > Isrāʾīl > Abū Isḥāq > al-Barāʾ

[Machine] "They used to enter the Kaaba from its back during the time of ignorance. Then Allah revealed, 'It is not righteousness that you enter the houses from the back, but righteousness is [in] one who fears [Allah]'"  

ابن حبّان:٣٩٤٧أَخْبَرَنَا النَّضْرُ بْنُ مُحَمَّدِ بْنِ الْمُبَارَكِ قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ عُثْمَانَ الْعِجْلِيُّ قَالَ حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُوسَى عَنْ إِسْرَائِيلَ عَنْ أَبِي إِسْحَاقَ عَنِ الْبَرَاءِ قَالَ

«كَانُوا فِي الْجَاهِلِيَّةِ إِذَا أَحْرَمُوا أَتَوْا الْبَيْتَ مِنْ ظَهْرِهِ فَأَنْزَلَ اللَّهُ {وَلَيْسَ الْبِرُّ بِأَنْ تَأْتُوا الْبُيُوتَ مِنْ ظُهُورِهَا وَلَكِنَّ الْبِرَّ مَنِ اتَّقَى} »  


See similar narrations below:

Collected by Bukhārī
bukhari:4512ʿUbaydullāh b. Mūsá > Isrāʾīl > Abū Isḥāq > al-Barāʾ

In the Pre-lslamic Period when the people assumed Ihram, they would enter their houses from the back. So Allah revealed:-- "And it is not righteousness that you enter houses from the back, but the righteous man is he who fears Allah, obeys His Orders and keeps away from what He has forbidden. So enter houses through their doors." (2.189)  

البخاري:٤٥١٢حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُوسَى عَنْ إِسْرَائِيلَ عَنْ أَبِي إِسْحَاقَ عَنِ الْبَرَاءِ قَالَ

كَانُوا إِذَا أَحْرَمُوا فِي الْجَاهِلِيَّةِ أَتَوُا الْبَيْتَ مِنْ ظَهْرِهِ فَأَنْزَلَ اللَّهُ {وَلَيْسَ الْبِرُّ بِأَنْ تَأْتُوا الْبُيُوتَ مِنْ ظُهُورِهَا وَلَكِنَّ الْبِرَّ مَنِ اتَّقَى وَأْتُوا الْبُيُوتَ مِنْ أَبْوَابِهَا}