# Locking Preferences in Mozilla

For security reasons, we need to "lock" some of the preferences in Mozilla Firefox. We are running Windows XP and the latest version of Mozilla version 14.0.1. In particular some of the security preferences such as `Security.ask_for_password`. If the user were to do `about:config`, we would like the particular options to be greyed out so they cannot click on them.

I have read that this can be done by adding the following in:

``````\Mozilla Firefox\defaults\pref\test.js

preflock("security.enable_ssl3", false);
``````

However, this does nothing.

-

Your file should start with double `//`, and I think the correct term is `lockPref`. The correct contents of your file should be;

``````//
lockPref("security.enable_ssl3", false);
``````

Also, you should save this file in the root of the installation directory and modify local-settings.js to load the file.

``````pref("general.config.filename", "test.js");
``````
-
Thanks for the help. I tried you way but it didn't seem to take. However, I also tried this: `lock_pref("security.enable_ssl3", false);` and it did set this preference to false. I will also try changing the local-settings.js now. This however, only gets me half way. It sets it as false but does not grey out the option. Any ideas? – JMeterX Aug 10 '12 at 16:01
lockPref should lock it, if it isn't locked, your file is not being loaded. – Bart De Vos Aug 10 '12 at 16:04
I might be overlooking it but where is the local-settings.js file located?...never thought I would ask such a question. – JMeterX Aug 10 '12 at 16:24
I'm on OSX, and I can find it here: `/Applications/Firefox.app/Contents/MacOS/defaults/pref/local-settings.js`, Windows-alternative would be `%PROGRAMFILES%\Mozilla Firefox\defaults\pref` I suppose. – Bart De Vos Aug 10 '12 at 16:27
Thanks for the help! For windows, You must place `local-settings.js` into `Program Files (x86)\Mozilla Firefox\defaults\pref` (it didn't exist and had to be created) I was missing the value to ensure it would read it as plain text so my `local-settings.js` looks like the following: `pref("general.config.obscure_value", 0); pref("general.config.filename", "thisworks.cfg");` I called `thisworks.cfg` and placed it into the root of Mozilla Firefox install directory as you had said, but I had to use the following markup for it to work `// lockPref("security.enable_ssl3", false);` – JMeterX Aug 10 '12 at 16:59