楼上说的对,但跟问题中的例句似乎关系不大.
ought to do中,to do并不是不定式,ought to 应看作一个整体,相当于一个情态动词,所以这个句子变不定式应按情态动词的变法:
can do --> can be done
ought to do --> ought to be done
People oughtn't to criticze her for this matter.
-->
She oughtn't to be criticized (by people) for this matter.