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.
bayhaqi:9137Abū Bakr b. al-Ḥārith al-Faqīh al-Aṣbahānī > ʿAlī b. ʿUmar al-Ḥāfiẓ > Muḥammad b. Makhlad > Saʿdān b. Naṣr > Abū Muʿāwiyah al-Ḍarīr > Ibn Jurayj > Ayyūb al-Sikhtiyānī > ʿIkrimah > Ibn ʿAbbās

[Machine] The forbidden one smells the scent of basil and enters the bathroom, pulls out his tooth, and aches the wound, and if his nail breaks, he removes the harm from it.  

البيهقي:٩١٣٧أَخْبَرَنَا أَبُو بَكْرِ بْنُ الْحَارِثِ الْفَقِيهُ الْأَصْبَهَانِيُّ أنبأ عَلِيُّ بْنُ عُمَرَ الْحَافِظُ ثنا مُحَمَّدُ بْنُ مَخْلَدٍ ثنا سَعْدَانُ بْنُ نَصْرٍ ثنا أَبُو مُعَاوِيَةَ الضَّرِيرُ عَنِ ابْنِ جُرَيْجٍ عَنْ أَيُّوبَ السِّخْتِيَانِيِّ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ قَالَ

الْمُحْرِمُ يَشُمُّ الرَّيْحَانَ وَيَدْخُلُ الْحَمَّامَ وَيَنْزِعُ ضِرْسَهُ وَيَفْقَأُ الْقُرْحَةَ وَإِذَا انْكَسَرَ ظُفْرُهُ أَمَاطَ عَنْهُ الْأَذَى  


See similar narrations below:

Collected by Bayhaqī
bayhaqi:9125Abū ʿAbdullāh al-Ḥusayn b. Muḥammad b. Fanjawayh al-Daynawarī Bi-al-Ddāmaghān > Aḥmad b. Jaʿfar b. Ḥamdān b. ʿAbdullāh > Yūsuf b. ʿAbdullāh b. Māhān > Abū Ḥudhayfah > Sufyān > Ayyūb > ʿIkrimah > Ibn ʿAbbās

[Machine] The pilgrim enters the bathroom and pulls out his tooth and smells the scent of roses, and if his nail breaks, he throws it away and says, "Remove harm from you, for Allah does not harm you in any way."  

البيهقي:٩١٢٥أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحُسَيْنُ بْنُ مُحَمَّدِ بْنِ فَنْجَوَيْهِ الدَّيْنَوَرِيُّ بِالدَّامَغَانِ ثنا أَحْمَدُ بْنُ جَعْفَرِ بْنِ حَمْدَانَ بْنِ عَبْدِ اللهِ ثنا يُوسُفُ بْنُ عَبْدِ اللهِ بْنِ مَاهَانَ ثنا أَبُو حُذَيْفَةَ ثنا سُفْيَانُ عَنْ أَيُّوبَ عَنْ عِكْرِمَةَ عَنِ ابْنِ عَبَّاسٍ قَالَ

الْمُحْرِمُ يَدْخُلُ الْحَمَّامَ وَيَنْزِعُ ضِرْسَهُ وَيَشَمُّ الرَّيْحَانَ وَإِذَا انْكَسَرَ ظُفْرُهُ طَرَحَهُ وَيَقُولُ أَمِيطُوا عَنْكُمُ الْأَذَى فَإِنَّ اللهَ ﷻ لَا يَصْنَعُ بِأَذَاكُمْ شَيْئًا