Is there a way to disable the installation of Firefox extensions by non-admin users?
migrated from superuser.com Feb 23 '10 at 13:56This question came from our site for computer enthusiasts and power users. |
|||
|
|
|||
|
Sort of. You can apply lock down settings with mozilla.cfg. This, however, will prevent all users from using locked down features though. Administrators can of course swap in/out the config file at will. http://www.pcc-services.com/kixtart/firefox-lockdown.html Edit: Here's the list of settings we deploy via lock down. It's a K-12 environment, so your needs will likely vary.
EDIT: I am adding a link to the official Mozilla.org docs regarding locked config settings. If the information I have provided does not answer your question well enough, please provide additional information describing your needs. |
||||
|
|
|
This is a variation, compiled from the helpful details @ MDN, MozillaZine, PCC-Services, Mike's Musings To block/prevent extensions (include this in the lock (policy) file):
Double slashes (//) outside code denote comments.
Setting Setting The (user) Scope 1 hybrid location (user profile 'extensions' folder) is the only store of the first installation method and is obsoleted by setting xpinstall.enabled to false, but is not scoped out (extensions.enabledScopes) as a discovered location (second installation method). The second code block above throws an error whenever this location appears, and Firefox exits. about:config, about:config Entries, Config Descriptions extension, Installing extensions, Special locations Approved extensionsTo enable approved extensions via Firefox install_directory\browser\extensions, set Alternatively (in Windows), to enable approved extensions via Windows registry HKLM, set To enable both locations, use 12, and 3 respectively. It's also possible to Internal store, Centralized extensions (FoxyProxy as example):Download and unzip FoxyProxy into a top-level subfolder in a network share (e.g. network share FxExts, and subfolder foxyproxy). Next, rename the foxyproxy subfolder with the value between the em:id tags in the unzipped install.rdf file - foxyproxy is renamed as foxyproxy@eric.h.jung. Next, in a text file enter the path in the first line, i.e. \\server\FxExts\foxyproxy@eric.h.jung, and also rename the text file (including the .txt extension) with the em:id value - New Text Document.txt is renamed as foxyproxy@eric.h.jung. These text files can be distributed to existing Firefox install_directory\browser\extensions, or included in the Firefox installer core\browser\extensions.
Alternatively or additionally via registry HKLM: Name foxyproxy@eric.h.jung, and Data \\server\FxExts\foxyproxy@eric.h.jung In either or both cases (Scopes 4 and 8):
If Policy filtering (selectively apply settings in the lock file):In Windows, Deny the Read Data permission on local-settings.js for the users/groups to be exempted. In GNU/Linux systems one option would be to set the base permissions of local-settings.js as 0600 (with root being the ug), add all users to a group (e.g. fxgrp) leaving out the to-be-exempt users, and then Please note that using OS environment variables is unsafe as it can be bypassed, unless extra measures outside of the lock (policy) file are implemented. Misc.: The Browser Console's command bar can be disabled by a CSS rule in a style sheet e.g.
Fx.css (style sheet) is loaded in Firefox Safe Mode too, and can specify both chrome (Firefox UI), and content (internal pages, web pages) rules. For NFS, or SMB mounts, or local filesystem, use [userChrome and userContent].css have the highest precedence, so it would be good to check for the chrome folder too, e.g. Chrome element names and IDs, Chrome URLs, Working with chrome URLs The other tools, and the GCLI can be disabled as is needed via the lock (policy) file - filter for For the details about the nsInterfaces in Components.interfaces.* please see XPCOM interfaces. PS: To reliably catch errors and conditions in the .cfg file of some Firefox editions, it may be necessary to put the whole lock (policy) contents inside a try block, e.g. XPConnect, XPCOM interfaces, JSCM, omni.ja, JS reference, quick JS, JS |
||||
|
|
|
Preventing users from installing addons is more difficult in later versions of Firefox. Firefox does not honor the xpinstall.enabled preference in some versions. (Edit: see comment below: they do honor this preference as of version 31) For a detailed write-up on how to modify Firefox to prevent Add-on Manager from displaying and how to prevent users from installing add-ons, check out this article. The instructions are not for the faint of heart, but they do work; I have 700 machines locked down in a K-8 environment using these directions. For more information on locking down browser settings, check out this article. |
|||||||||
|