Mozilla.cfg -- Failed to Read configuration files
I am a network admin and I am attempting to deploy a Mozilla.cfg and have been researching how to properly do this for the last few weeks.
I am attempting to create missing, edit existing, and lock preference settings in the about:config fields that are mandated that we have on our network.
I have created the Overide.ini, the Mozilla.cfg, and the local-setting.js and placed them in the appropriate folders on our test machine (C:\Program Files\Mozilla Firefox for .cfg & .ini and C:\Program Files\Mozilla Firefox\default\pref for the .js), but when the test machine launches Mozilla, it gives an error of "Failed to read the configuration file. Please contact your system administrator".
I have been using lockPref to lock existing preferences, and user_pref to create them if they're missing, but am wondering if I am missing an update command prior to locking.
For Example:
1)lockPref("security.default_personal_cert", "Ask Every Time"); ----- is a preference that is defaulted by Mozilla as to what we would like to be here in our network, the only thing that is outstanding is we would like to lock it for edit-ability by our user community, so just locking it should be sufficient.
2)lockPref("browser.formfill.enable", false); ---- is a preference that is defaulted by Mozilla opposite of what we would like. So must we update the preference with a different command that I may be missing somewhere or is using lockPref correct to change and lock in the same command.
3) user_pref("signon.prefillForms", false); lockPref("signon.prefillForms", false); ---- This preference missing from the default preferences in Mozilla in comparison to what is required of our network. So to create it we've been using user_pref and then locking. Is this sufficient?
Are there alternate files that I must delete, alter, etc to get the .cfg to read correctly when launching or....I'm at a loss over here... below are my three files.
OVERRIDE.INI
[XRE] EnableProfileMigrator=false
MOZILLA.CFG
// WKS Mozilla Firefox Lockdown // Disable updater
lockPref("security.default_personal_cert", "Ask Every Time");
lockPref("network.protocol-handler.external.shell", false);
lockPref("plugin.disable_full_page_plugin_for_types", "application/PDF, FDF, SFDF, LSL, LSO, LSS, IQY, RQY, XLK, XLS, XLT, POT PPS, PPT, DOS, DOT, WKS, BAT, PS, EPS, WCH, WCM, WB1, WB3, RTF, DOC, MDB, MDE, WBK WB1, WCH, WCM, AD, ADP");
lockPref("browser.formfill.enable", false);
user_pref("signon.prefillForms", false); lockPref("signon.prefillForms", false);
lockPref("signon.rememberSignons", false);
lockPref("privacy.sanitize.timespan", 40);
user_pref("privacy.sanitize.promptOnSanatize", false); lockPref("privacy.sanitize.promptOnSanatize", false);
lockPref("dom.disable_window_open_feature.status", true);
lockPref("dom.disable_window_move_resize", true);
user_pref("security.enable_tls", true); lockPref("security.enable_tls", true);
user_pref("security.enable_ssl2", false); lockPref("security.enable_ssl2", false);
user_pref("security.enable_ssl3", false); lockPref("security.enable_ssl3", false);
lockPref("security.tls.version.min", 2);
lockPref("security.tls.version.max", 3);
lockPref("dom.diable_window_flip", true);
lockPref("dom.event.contextmenu.enabled", false);
lockPref("dom.disable_window_move_resize", true);
lockPref("dom.disable_window_status_change", true);
lockPref("dom.disable_window_open_feature.status", true);
user_pref("security.warn_leaving_secure", true); lockPref("security.warn_leaving_secure", true);
lockPref("app.update.enabled", true);
lockPref("app.update.url", "https://aus5.mozilla.org/update/6/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%(noBug1296630v1)(nowebsense)/%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml");
lockPref("app.update.url.details", "https://www.mozilla.org/%LOCALE%/firefox/notes");
lockPref("app.update.url.manual", "https://www.mozilla.org/firefox/");
lockPref("extensions.update.enabled", false);
lockPref("browser.search.update", false);
lockPref("privacy.clearOnShutdown.cookies", true);
lockPref("browser.startup.homepage", "**");
user_pref("privacy.item.history", false); lockPref("privacy.item.history", false);
user_pref("privacy.item.cache", false); lockPref("privacy.item.cache", false);
user_pref("services.sync.autoconnect", false); lockPref("services.sync.autoconnect", false);
lockPref("service.sync.engine.addons", false);
lockPref("service.sync.engine.bookmarks", false);
lockPref("service.sync.engine.history", false);
lockPref("service.sync.engine.passwords", false);
lockPref("service.sync.engine.prefs", false);
lockPref("service.sync.engine.tabs", false);
lockPref("plugins.click_to_play", false);
user_pref("xpinstall.enabled", false); lockPref("xpinstall.enabled", false);
user_pref("moz_crashreport_disable", 1); lockPref("moz_crashreport_disable", 1);
lockPref("browser.urlbar.autocomplete.enabled", false);
LOCAL-SETTINGS.JS
// pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);
Ändrad
Alla svar (1)
You can't use user_pref() calls in mozilla.cfg. The user_pref() call only works in pref.js and user.js in the profile folder because these files are interpreted and not executed as privileged JavaScript like mozilla.cfg
A lockPref() call is sufficient to lock a pref to a specific value. So remove all user_pref lines to see if that makes the file work.
Note that localized prefs need a special treatment only when you want to set the default value by using a data URI.
- https://mike.kaply.com/2012/03/15/customizing-firefox-default-preference-files/
- https://mike.kaply.com/2012/08/29/setting-the-default-firefox-homepage-with-autoconfig/
These functions can be used in the mozilla.cfg file:
defaultPref(); // set new default value pref(); // set pref, allow changes in current session lockPref(); // lock pref, disallow changes
More: