Even though one does not know the value of chanting the holy name of the Lord, if one chants knowingly or unknowingly, the chanting will be very effective
SB Canto 6
If a person unaware of the effective potency of a certain medicine takes that medicine or is forced to take it, it will act even without his knowledge because its potency does not depend on the patient's understanding. Similarly, even though one does not know the value of chanting the holy name of the Lord, if one chants knowingly or unknowingly, the chanting will be very effective.
In the Western countries, where the Hare Kṛṣṇa movement is spreading, learned scholars and other thoughtful men are realizing its effectiveness. For example, Dr. J. Stillson Judah, a learned scholar, has been very much attracted to this movement because he has actually seen that it is turning hippies addicted to drugs into pure Vaiṣṇavas who voluntarily become servants of Kṛṣṇa and humanity. Even a few years ago, such hippies did not know the Hare Kṛṣṇa mantra, but now they are chanting it and becoming pure Vaiṣṇavas. Thus they are becoming free from all sinful activities, such as illicit sex, intoxication, meat-eating and gambling. This is practical proof of the effectiveness of the Hare Kṛṣṇa movement, which is supported in this verse. One may or may not know the value of chanting the Hare Kṛṣṇa mantra, but if one somehow or other chants it, he will immediately be purified, just as one who takes a potent medicine will feel its effects, regardless of whether he takes it knowingly or unknowingly.