Cover vessels, waterskins, close the doors and extinguish the lamps, for the Satan does not loosen the waterskin, does not open the door and does not uncover the vessels. And if one amongst you fails to find (something) to cover it well, he should cover it by placing (a piece of) wood across it. Qutaiba did not mention the closing of the doors in the hadith transmitted by him.
عَنْ رَسُولِ اللَّهِ ﷺ أَنَّهُ قَالَ غَطُّوا الإِنَاءَ وَأَوْكُوا السِّقَاءَ وَأَغْلِقُوا الْبَابَ وَأَطْفِئُوا السِّرَاجَ فَإِنَّ الشَّيْطَانَ لاَ يَحُلُّ سِقَاءً وَلاَ يَفْتَحُ بَابًا وَلاَ يَكْشِفُ إِنَاءً فَإِنْ لَمْ يَجِدْ أَحَدُكُمْ إِلاَّ أَنْ يَعْرُضَ عَلَى إِنَائِهِ عُودًا وَيَذْكُرَ اسْمَ اللَّهِ فَلْيَفْعَلْ فَإِنَّ الْفُوَيْسِقَةَ تُضْرِمُ عَلَى أَهْلِ الْبَيْتِ بَيْتَهُمْ وَلَمْ يَذْكُرْ قُتَيْبَةُ فِي حَدِيثِهِ وَأَغْلِقُوا الْبَابَ