I am asking this question on behalf of a Muslim sister. She performed Hajj two times while covering her face. She did so because she was uncomfortable in the presence of men when she was outside. She did this knowing that it's prohibited to cover her face during Hajj. She is now worried and wants to know if there is any compensation needed for this?
Imam al-Bukhari and an-Nasa-i compiled the following hadith:
A person stood up and asked, "O Allah's: Apostle! What clothes may be worn in the state of Ihram?" The Prophet (ﷺ) replied, "Do not wear a shirt or trousers, or any headgear (e.g. a turban), or a hooded cloak; but if somebody has no shoes he can wear leather stockings provided they are cut short off the ankles, and also, do not wear anything perfumed with Wars or saffron, and the Muhrima (a woman in the state of Ihram) should not cover her face, or wear gloves." (Sahih al-Bukhari)
So wearing niqab is actually not allowed during Ihram, it is not even known as a sunnah of the prophet () in other cases, but the prophet () never rejected it when he saw a woman wearing niqab.
So in practice if a woman hid her face from the glance of a foreign man this is rather permissible, while wearing the niqab all the time is not.
Basically there are three cases that must be taken into account:
wearing niqab while wearing ihram due to ignorance of the prohibition. In this case there's no compensation necessary because Allah the almighty says:
Allah does not charge a soul except [with that within] its capacity. It will have [the consequence of] what [good] it has gained, and it will bear [the consequence of] what [evil] it has earned. "Our Lord, do not impose blame upon us if we have forgotten or erred. Our Lord, and lay not upon us a burden like that which You laid upon those before us. Our Lord, and burden us not with that which we have no ability to bear. And pardon us; and forgive us; and have mercy upon us. You are our protector, so give us victory over the disbelieving people." (2:286)
... And there is no blame upon you for that in which you have erred but [only for] what your hearts intended. And ever is Allah Forgiving and Merciful. (33:5)
This is one opinion of imam a-Shafi'i and that of Ahmad, Dawood and Ishaaq while most scholars say there's no difference between an ignorant or a person who knows the ruling on this, both are asked to compensate (This is according to imam al-Qurtobi in his tafsir see here the view of imam Malik, abu Hanifa, al-Laith ibn Sa'ad and Sufyan a-Thawri the second view of imam a-Shafi'i).
wearing it although knowing this rule because of an accepted reason. In this case the compensation is described in:
And complete the Hajj and 'umrah for Allah . But if you are prevented, then [offer] what can be obtained with ease of sacrificial animals. And do not shave your heads until the sacrificial animal has reached its place of slaughter. And whoever among you is ill or has an ailment of the head [making shaving necessary must offer] a ransom of fasting [three days] or charity or sacrifice. And when you are secure, then whoever performs 'umrah [during the Hajj months] followed by Hajj [offers] what can be obtained with ease of sacrificial animals. And whoever cannot find [or afford such an animal] - then a fast of three days during Hajj and of seven when you have returned [home]. Those are ten complete [days]. This is for those whose family is not in the area of al-Masjid al-Haram. And fear Allah and know that Allah is severe in penalty. (2:196)
and the sahih hadith:
Ka'b bin 'Ujra said that Allah's Messenger (ﷺ) said to him (Ka'b), "Perhaps your lice have troubled you?" Ka'b replied, "Yes! O Allah's Messenger (ﷺ)." Allah's Messenger (ﷺ) said, "Have your head shaved and then either fast three days or feed six poor persons or slaughter one sheep as a sacrifice." (See for example in Sahih al-Bukhari)
This means this lady which covered her face because of the presence of men should either fast three days (according the majority of scholars and based on the verse above), or feed six poor people at the haram in Makah (according most scholars but according to al-Qurtobi some scholars say anywhere) or do a sacrifice at the haram in Makah (according the majority while imam Malik said as Allah clearly said it is a "nusuk/sacrifice نسك" there's no special place where it must be done as sacrifice can be performed any where in opposition to hady/offering هدي see 5:95 -for details see in tafsir al-Qurtobi-).
As for the place where one should compensate by fasting scholars are in consensus that it can be any where according the quotes of imam Abu Bakr ar-Razi al-Jassas in his tafsir see here in Arabic.
wearing it nevertheless without a valid reason. This certainly is a sinful act and compensation is necessary.
Some references used islamqa #12516