How to lock network settings so the proxy cannot be changed?
Hello, I've been searching around and I still can't seem to be able to lock the network settings in Firefox 31.0. I've followed several tutorials including these:
http://kb.mozillazine.org/Locking_preferences http://ip5kb.stbernard.com/webhelp/iPrism/WhatsNew/50SupportFiles/SupportFiles/IP0460.htm http://daxserver.com/lock-preferences-in-firefox/ http://ilias.ca/blog/2005/03/locking-mozilla-firefox-settings/ http://stealthpuppy.com/prepare-mozilla-firefox-for-enterprise-deployment-and-virtualization/
I've tried to edit the channel-prefs.js and create a local-settings.js, but neither of them seem to work.
My channel-prefs.js looks like this: pref("app.update.channel", "release"); pref("general.config.filename", "mozilla.cfg");
And when I created the local-settings.js it looks like this: pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg");
and my mozilla.cfg file has the following: // lockPref("browser.startup.homepage", "http://www.eastonpl.org/Index.html"); lockPref("privacy.sanitize.sanitizeOnShutdown", true); lockPref("network.proxy.HTTP", "192.168.0.60"); lockPref("network.proxy.HTTP_port", 8080); lockPref("network.proxy.type", 1);
When I do that I expected it to look like the one example here: http://ip5kb.stbernard.com/webhelp/0460b.jpg
But here is what the Network -> Connection Settings actually looks like: http://i.imgur.com/q0uMMb5.png
So my above mozilla.cfg locks the radio buttons at the top, but I am still able to edit the text boxes with the proxies in it.
how do I get it so the users aren't able to change this proxies?
Thanks.
ప్రత్యుత్తరాలన్నీ (8)
hello chrisharvey137, please leave the channel-prefs.js file untouched, a local-settings.js with the settings you have mentioned is enough...
since the mozilla.cfg file is case sensitive, please see if you can get it to work with the following:
lockPref("network.proxy.http", "192.168.0.60"); lockPref("network.proxy.http_port", 8080);
Thanks for the quick response! But it doesn't seem to use the local-settings.js. I placed the file here: C:\Program Files\Mozilla Firefox\defaults\pref
Is there anything else that I need to do to point Firefox to the local-settings.js?
the content of your local-settings.js file looks alright - can you look that it is ANSI encoded (instead of UTF-8)...
When I go to save it in notepad the encoding shows ANSI.
It should matter if the file is UTF-8 or ANSI because there should only be plain ASCII text in the file.
You should however make sure that the file is a .js (JScript) file and not a TXT file with a hidden .txt file extension.
The files may need to have Unix line endings (LF instead of CR/LF) to make it work.
I checked the file and it is a .js, I'm a bit confused about the Unix line ending, could you explain how to do that for me?
Thank you so much for the help!
You can try to use the Scratchpad (Firefox/Tools > Web Developer) to create the files.
It is best to leave the channel-prefs.js file with its default content and not add code to this file.
pref("app.update.channel", "release");
The mozilla.cfg file needs to be in the Firefox program folder and not in a sub folder.
What is the purpose of the mozilla.txt file? Are you using a byte shift (rot-13) on the mozilla.cfg file?
I'm using this site for the byte shift:
http://www.alain.knaff.lu/howto/MozillaCustomization/cgi/byteshf.cgi
And here is where I put the mozilla.cfg file: C:\Program Files\Mozilla Firefox
The mozilla.txt file is what I edit and upload to the above site to get the .cfg file. Should I have the pref that you wrote out in the mozilla.cfg file or the local-settings.js file?
Thank you so much for the help!