Yes, exactly. Go to npc's xml and there is a row "teachto" with ids. It's classes IDs, so you define which class can speak/enchant skills @ this npc.
For example Aiken (30850), the human skill enchanter.
<teachTo classes="0;1;2;3;4;5;6;7;8;9"/>
Just add more IDs (for all classes till 57, if I'm not wrong) ;)