Sahih al-Bukhari, Book 75, Hadith 25 (Bukhari 5451)

Narrated Ka`b bin 'Ujara:

The Prophet (ﷺ) passed by me while I was kindling a fire under a (cooking) pot. He said, "Do the lice of your head trouble you?" I said, "Yes." So he called a barber to shave my head and ordered me to make expiation for that."