1

Ok, so I have local root access to a machine with a lot of local user accounts. These all have some version of a a particular extension that was installed under their user account during account setup (various versions depending on when the account was created for the user). Poor way to manage I know, but it's an old system that I was handed as is.

I am in the process of trying to update the extension globally. I have a version installed under my profile, I copied out the extension's correctly named folder (friendly name not the ID string) and moved it to the location described below. There is also an XML config file that goes along with the extension that I separately figured out how to copy to all users Firefox profiles.

Global addon install - "If you want to install an extension automatically to all users in your system you need to extract it, rename the folder that contains the addon to the addon's id string and copy it to the firefox global extensions folder /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/, anything that you use there will be called up automatic when a user opens firefox."

Outcome for new users - Created a new test user, logged in, and the extension is there / functioning. XML is there so all the configs are present. All good!

Outcome for existing users - No errors or anything but the older version of the app is still present. I see no mention of the new version of the app that was placed in the global extensions folder. The XML is there and the old version of the addon does see it - so I am good there. Is there a way I can only make firefox recognize addons installed from the global location? I think because the same extension is installed under their user profile, it is taking precedence. I could be wrong though. I am new to Ubuntu administration.

5
  • 1
    It sounds like you have to remove the older versions of the add-on. Jan 14, 2016 at 1:53
  • I would need to do it for all users though. What I am trying to avoid is having to login as EVERY single user and perform an action or have them do it.
    – jayhat
    Jan 14, 2016 at 20:52
  • If you have root access, you should be able to remove the extensions by deleting the files for each user. The extensions should be stored in /home/username/.mozilla/firefox/profiles/profilename/extensions Jan 14, 2016 at 23:00
  • Thanks. I realize it can be done via command line, but I don't know how to do for all users. I know I could do it per user but there are hundreds of users on the machine, so navigating to each via CLI and deleting the folder is not worth it.
    – jayhat
    Jan 14, 2016 at 23:24
  • The only other way I can think of is to completely reinstall Firefox, and then install the extension globally. Of course, doing it this way would also reset any user data, like bookmarks, history, preferences, other extensions, and so on. Jan 15, 2016 at 3:29

1 Answer 1

2

Depending on how many users you have you could potentially do this with

sudo rm -rf /home/*/.mozilla/firefox/profiles/*.default/extensi‌​ons/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}*

If you have lots of matches for the first glob this won't work; this will also fail if your user's home directories are not in a typical place. In that case you could iterate over each user. If you go through the trouble of iterating over each user you can also make the command safer by executing your cleanup by the user using sudo. Something like

cat list_of_users| xargs -I% sudo -Hu % sh -c 'rm -rf ~/.mozilla/firefox/profiles/*.default/extensi‌​ons/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}*'

Alternatively you could integrate some logic into your global profile I suggest testing the manifest in the home directory to see if it is older than the global and removing the extension.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .