locking preferences in Firefox 63.0
I searched high and low on the internet to find out how to lock down preferences, most that I found had incomplete information and for older versions. The last entry I found on this forum was from three years ago for version 38 and where to place the files was clear but when to use the commands lockPref, userPref and pref wasn't clear. For version 63 none of what I found was working. Well, diligence paid off. I kept experimenting until I found the correct combination. Where the different pref commands were used and the files locations was the problem. I couldn't use lockPref in the user.js file, I couldn't use the user_pref in the mozilla.cfg file. I was hoping to combine the commands together but it wouldn't work. So, here is what I came up with, spelled out clearly as to how it is setup. Almost every place I found on the internet would not have all the information spelled out leaving me scratching my head as to what they were trying to say. Here is the procedure I put together:
Mozilla Firefox version 63.00 Setup for Locking Files
1. Open Firefox and type “about:config” into the path bar.
a. For any preference that is locked you will see the entries in italics and the status displaying “locked”
2. Create the following as text files and change the extension on each.
a. mozilla.cfg – lists desired files to be locked. i. The first line is always a double forward slash (//) ii. Starting at the second line, use the lockPref command – examples: 1. lockPref("app.update.enabled", false); 2. lockPref("security.tls.version.min", 2); b. local-settings.js – uses mozilla.cfg to lock the preferences. i. Add the following entries. Do NOT place a “//” on the first line of the file. 1. pref("general.config.filename", "mozilla.cfg"); 2. pref("general.config.obscure_value", 0); c. user.js – changes the settings for each of the listed preferences. i. Enter the same entries that were in mozilla.cfg but use the “user_pref” command at the beginning of each entry. Do NOT place a “//” on the first line of the file. 1. user_pref("app.update.enabled", false); 2. user_pref("security.tls.version.min", 2);
3. The folders where mozilla.cfg and local-settings.js files are located have full Administrators and System rights assigned, however to make changes to these files copy them to another folder (i.e. Desktop) then copy it back into its respective folder. The UAC prompt asks to accept the changes. A regular user shouldn’t have rights to do this.
4. Location is very important for each of the above files. Place each in their respective directories as shown below.
a. mozilla.cfg is placed into: i. C:\Program Files\Mozilla Firefox b. Local-settings.js is placed into: i. C:\Program Files\Mozilla Firefox\defaults\pref c. User.js is placed into: i. C:\Users\”username”\AppData\Roaming\Mozilla\Firefox\Profiles\*this folder name will vary for each installation*
5. To disable the files listed in mozilla.cfg, open the local-setting.js file and add “//” to the beginning of each line to remark them out, save and then restart Firefox. Verify in Firefox under “about:config” that the “locked” status was removed. Of course, to lock them again, remove the “//”.
My question now stands as when GPO is set up to push, is it these three files pushed to their respective locations for each roaming profile and computer?
Alle Antworten (3)
Note that it doesn't make sense to use the user.js file like you did with the same pref settings as in mozilla.cfg because locked prefs can't be overridden, so the user.js file would only be used when mozilla.cfg is disabled.
See these articles for up to date documentation:
Thank you, I will try it without the user.js file
Hi sullijwiii
Maybe this will help too:
https://support.mozilla.org/en-US/kb/customizing-firefox-using-policiesjson
I am moving this question to Firefox for Enterprise. The policies should work on both "Firefox" (currently FF63) and "Firefox for Enterprise" (currently ESR60)
Cheers!
....Roland
Geändert am