It is narrated from Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him) that he suffered an ailment of the head, so the Prophet (peace and blessings be upon him) ordered him to shave and give a cow as ransom.
Hadith Referenceالمعجم الكبير للطبراني / باب الكاف / 16413
It is narrated from Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him) that he suffered an ailment of the head, so he shaved it, then said to the Prophet (peace and blessings be upon him): With what shall I offer a sacrifice? He (peace and blessings be upon him) ordered him to take a hady (sacrificial animal), garland it, then drive it along until he made it stand at Arafah with the people, then depart with it along with the people; and this is what is done with the hady.
Hadith Referenceالمعجم الكبير للطبراني / باب الكاف / 16414