Praise be to Allah.
This hadeeth was narrated by al-Bukhaari (4802) and Muslim (1466) from Abu Hurayrah (may Allaah be pleased with him) from the Prophet (peace and blessings of Allaah be upon him) who said: “A woman may be married for four things: her wealth, her lineage, her beauty and her religious commitment. Seek the one who is religiously-committed, may your hands be rubbed with dust (i.e., may you prosper).”
There is nothing in this hadeeth to suggest that it is enjoined or encouraged to marry a woman for her beauty, lineage or wealth. Rather what it means is that these are things that people look for in marriage. Some look for a wife who is beautiful, some look for a wife who is descended from a noble family, some look for a wealthy wife, and some look for a wife who is religiously-committed – and this last is what the Prophet (peace and blessings of Allaah be upon him) encouraged when he said: “Seek the one who is religiously-committed, may your hands be rubbed with dust (i.e., may you prosper).”
Al-Nawawi (may Allaah have mercy on him) said in Sharh Muslim:
The correct view concerning the meaning of this hadeeth is that the Prophet (peace and blessings of Allaah be upon him) spoke of what people usually do, for they seek these four characteristics, the last of which in their view is religious commitment, but you who are seeking to follow the right way should seek the one who is religiously committed. This is not a command to do so… This hadeeth encourages us to seek the company of religiously-committed people in all things, because the one who keeps company with them will benefit from their good attitude and good ways, and will be safe from any bad influence from them.
Al-Mubaarakfoori said in Tuhfat al-Ahwadhi:
Al-Qaadi (may Allaah have mercy on him) said: It is the people’s custom to seek certain characteristics in women and to choose a wife for a certain quality. It befits those who are religiously-committed to base their actions on religious guidance, especially with regard to matters that are serious and have lasting effects.
The scholars differed greatly as to the meaning of the words, “May your hands be rubbed with dust.” Al-Nawawi (may Allaah have mercy on him) said in Sharh Saheeh Muslim:
The most correct view is that of the muhaqqiqeen, that this is a phrase which originally ‘May you become poor’, but the Arabs customarily used it in a sense other than its original meaning, so they would say things such as, ‘May your hands be rubbed in the dust,’ ‘May Allaah kill him, how brave he is!’, ‘May he have no mother,’ ‘May you have no father,’ ‘May his mother be bereft of him,’ ‘Woe to his mother,’ and so on which they would say in the context of denouncing, rebuking, criticizing, expressing outrage encouraging an action, or expressing admiration, and so on.
And Allaah knows best.