Deviant Logo

Allow Non-admin Users to Update Firefox

post details top
Dec 15th, 2007
post details top

We recently noticed a problem where Firefox would prompt users (who are not administrators on their workstations) to update to the latest version (ie, from 2.0.0.8 to 2.0.0.9). If they tried to complete the update however, it would fail, giving the error “Software Update Failed”.

We decided the best solution was to come up with a way to let users update Firefox themselves, without being made local admins. The reason we wanted them to be able to do this is that IT doesn’t get around to everyone’s workstation often enough to keep up with the latest version of Firefox, and we felt that it was important for them to have that (for security reasons).

After some testing I found that a Domain User account was able to install Firefox updates if they were given write permissions to the C:\Program Files\Mozilla Firefox folder (or wherever Firefox may be installed in your case). To go around to each workstation and change that permission would still be troublesome (30 workstations plus some odd laptops, and no time to spare). So I came up with a solution that I could implement from my desk.

I did this through the use of PsExec from SysInternals (now Microsoft Corp.). PsTools only has to be installed on the workstation you’re running it from, and it’s a completely free download from Microsoft’s website (see here). This tool allows you to run commands / programs on remote systems. It helps if you extract them to someplace that is in your PATH, such as C:\Windows\System32 (just don’t overwrite anything). Once PsTools is installed, it’s easiest if you create a list of all the workstations you want to update, if you don’t already have that. The list needs to be one workstation per line (or at least, that’s how it worked for me).

psexec @active_workstations.txt -u DOMAIN\bwoodruff cacls "C:\Program Files\\Mozilla Firefox" /E /G "DOMAIN\Domain Users":W

That is the command I used to re-permission the folder and give users the access they need to run the update.

The bits in blue need to be replaced with your own values. active_workstations.txt is the name I gave the file that listed all the workstations I wanted to run the command on (note: leave in the @ – it isn’t part of the file name), and in each instance DOMAIN needs to be replaced with your Active Directory domain (not the FQDN, just the part NetBIOS uses). “bwoodruff” should be replaced with a domain admin user account.

This should work if you are on a workgroup also, but you will have to change DOMAIN\bwoodruff to a local admin account that exists on each workstation (“Administrator” usually works – unless you’re on XP Home, ugh). You’ll also have to change DOMAIN\Domain Users to the local users group (usually just “Users”).

The command should output something like “cacls exited with error code 0″ for each workstation that was in your list.

This should also work for changing permissions on other folders.

Read more: http://www.markmmanning.com/blog/2007/12/allow-non-admins-to-update-firefox.html

8 Comments

  • Darkdays

    That “Software Update Failed” message comes up on A LOT of computers at my college.

  • itismike

    If you have rights to modify Group Policy, the permissions can be modified very easily on all PCs, and this method doesn’t rely on every PC being reachable at the time the script is executed:

    Computer Configuration|Windows Settings|Security Settings|File System:
    %ProgramFiles%\Mozilla Firefox

    Configure this file or folder then: Propagate inheritable permissions to all subfolders and files
    Permissions
    Type Name Permission Apply To:
    Allow NT AUTHORITY\Authenticated Users Modify This folder, subfolders and files

  • M. Abraham

    Giving the user write permission to the Firefox-files is exactly what you don’t want to do. This just undermines the security you gain, when browsing as non-admin. Imagine a virus/trojan-program that the user starts. It might try to replace the Firefox-executable with a modified one that phishes for passwords. It would fail replacing it, if the user has no privileges in this directory.
    But don’t ask me for a solution. I came here while searching for one. My idea would have been, to run the Firefox-updater as a service in background. But I don’t know, if this is possible.

  • M. Abraham

    But if you’re already using psexec you could update all computers by silently installing the new version on all of them:
    psexec @active_workstations.txt -u DOMAIN\bwoodruff -c “Firefox Setup .exe -ms”
    The -c switch tells psexec to copy the setup-file to the local machine before executing it.
    Ok, just one solution that came to my mind while searching. Surely not the perfect one because this need to be done regulary.

  • Ben Woodruff

    You have a good point about the potential insecurity of doing this, M. Abraham. I’ll do some looking into that when I have a chance. Do you know of any specific malware that would try to take advantage of this?
    The problem with using psexec is that we have ~20 workstations about ~5 laptops that are deployed (plus about 3 spares of each). The spares are never turned on and the laptops are rarely on-site. Workstations are only on if the employee who they are assigned to is in the office.
    We were able to coordinate having all of those machines on, and on the network, once. We certainly wouldn’t be able to do it every time there was a Firefox update.

    I’m not saying that convenience should outweigh security (as that’s completely against my whole philosophy), but in this case it was the only option we could find that was workable.

  • M. Abraham

    The only solution for this problem is not to use Firefox but IE. Yes, I hate to say that, but if you want the user to work and surf with limited rights (and you really want to do that!) and you also want automatic updates (and you really want that too!) it’s the only way.
    If one could integrate third-party-products in this mechanism it would be perfect. (Got to search for that now!)

    You could deploy any new versions of Firefox via Active Directory and hope, that the laptops show up within a reasonable time. So the machines don’t need to be online all at the same time but get their software the next time they boot up in you local net.

    And no, I don’t know any malware that works like this but to me it’s sounds like a potential way to get passwords easily.

  • corey

    After trying, this doesn’t work with UAC in Windows Vista

  • Jerry

    How do you stop the non-administrative accounts on a computer from continuing to try to upgrade, after the upgrade has been performed from the administrative account on that computer?

Leave a Reply