Where do I find the NEI configuration file?

Solution 1:

For the mod NEI (NeverEnoughItems), your configuration file can be found here:
%AppData%/Roaming/.minecraft/config/NEI.cfg
or more familiarily: C:/Users/[Your username]/Roaming/.minecraft/config/NEI.cfg


As for adding a lock on cheatmode, simply change this line in the configuration file:
    cheatmode=0

Line 22 - Deactivate Cheatmode

    lockmode=1

Line 29 - Activating Lockmode

Note: Line numbers may vary from version to version.