Enabling NTLM Authentication (Single Sign-On) in Firefox

This HowTo will describe how to enable NTLM authentication (Single Sign-On) in Firefox.

How many of you have noticed that when you are using Internet Explorer and you browse to your companies intranet page that it will automatically authenticate you but when you use Firefox you will be prompted with a login box?

I recently, in searching for solutions to allow NTLM authentication with Apache, stumbled across how to set a preference in Firefox that will pass the NTLM authentication information to a web server. The preference is network.automatic-ntlm-auth.trusted-uris.

So how do you do it?

1) Open Firefox and type “about:config” in the address bar. (without the quotes of course)
2) In the ‘Filter’ field type the following “network.automatic-ntlm-auth.trusted-uris”
3) Double click the name of the preference that we just searched for
4) Enter the URLs of the sites you wish to pass NTLM auth info to in the form of:

http://intranet.company.com,http://email.company.lan

5) Notice that you can use a comma separated list in this field.
6) Updated: I have created VBScript that can be used to insert this information into a users prefs.js file by using group policy or standalone if for some reason you want to use it for that.

The script is available to be downloaded here.

After downloading the script you will want to extract it from the ZIP archive and then modify the line starting with strSiteList.

NOTE: This script will not perform its function if the user has Firefox open at the time the script is executed. Running the script through group policy will work without problem unless for some reason your group policy launches Firefox before the execution of this script.

You can read through the rest of the script for additional information. If you have questions, comments or concerns please let me know.

About Matt

IF YOU REALLY want to hear about it, the first thing you'll probably want to know is where I was born, and what my lousy childhood was like, and how my parents were occupied and all before they had me, and all that David Copperfield kind of crap, but I don't feel like going into it, if you want to know the truth.

In any case I am employed as a Senior Linux Systems Engineer at Rackspace in San Antonio, TX.

I spent the majority of my college years as an Astrophysics major specializing in black holes. When I got to my senior year and was studying 40 hours a week to stay on track I decided to bail and pursue an easier career.

I spend the majority of my time now contributing to WordPress, developing WordPress plugins, helping out in the WordPress IRC Channel, playing football (not American!), practicing Krav Maga, and last but not least, spending time with my Wife and Son.

This entry was posted in HowTo. Bookmark the permalink.

38 Responses to Enabling NTLM Authentication (Single Sign-On) in Firefox

  1. frances says:

    Good clear instructions.

  2. Pingback: Enabling NTLM Authentication (Single Sign-On) in Firefox | Sivel.net

  3. Rob says:

    Now can you get it to pass kerberos auth?

  4. Pingback: Podcast #5 - stackoverflow

  5. Pingback: Mind Gravy » Blog Archive » links for 2008-05-23

  6. Sol says:

    network.automatic-ntlm-auth.trusted-uris seems to be removed in firefox 3…

  7. Matt says:

    @Sol: I just checked and that configuration is indeed still in Firefox 3.

  8. Dan says:

    @Sol: you probably mistyped something. Just use “ntlm” as your filter, there will only be three or four results, and the trusted-urls one is definitely in there in FF3.

  9. Naël says:

    Thanks. Works on FF 3

  10. Jesse says:

    This is amazing, thanks so much. I already deployed it to my whole company

  11. JungHwan Lee says:

    This is great help to use without authentication at work.
    It bumped up before. now I am happy with this solution.
    Thanks!

  12. MS_user says:

    I have made the entry in “about:config”. I still have to provide my user credentials.
    preference name:= network.automatic-ntlm-auth.trusted-uris
    value:= http://microsoft.com/team_mate

    the site still prompts me for credentials.

  13. Pingback: How To Enable Firefox to Login Automatically to Intranet Servers – Yanachik.org

  14. Ronny says:

    Hi,

    is there any chance to get a hand on this great VBS? the link is down.

    Since

    Ron

  15. Pavlos says:

    Would there be a problem if https is used? I’m setting the value for our sharepoint server (IT set it up with https for both internal and external) and am still prompted for credentials… Argh.

  16. Merle Reine says:

    I enabled network.automatic-ntlm-auth.trusted-uris and added http://support.therocksandiego.org but it still prompts me for a user/pass when I enable single-signon in the support application. Works fine in IE. Any thoughts?

  17. Merle Reine says:

    p.s. Its the new firefox 3.5.5

  18. @Merle Reine,

    Instead of putting the whole url in the field, try just putting the domain. Instead of:

    http://support.therocksandiego.org

    put in:

    therocksandiego.org

    That’s the format I use for our intranet and it auto authenticates for me just fine.

  19. Stephen says:

    This addon makes managing the list of URLs even easier:
    https://addons.mozilla.org/en-US/firefox/addon/13816/

  20. Cal says:

    I have Firefox login to SharePoint working from a Windows machine. But Firefox with the same settings on Linux just goes into an infinite loop of asking for authentication. Has anyone figured out how to get NTLM to work from Linux?

    • Cal says:

      OK, I finally found the magic combination. After setting network.automatic-ntlm-auth.trusted-uris as above, in IIS I had to have only ASP.NET Impersonation and Basic Authentication enabled. I had to disable Windows Authentication. With this setup, I get automatic authentication from Firefox/Linux, but now I have to provide username/passwd for IE/Windows! Looks like I may end up with two incarnations of the same server, to handle different authentication schemes.

      SharePoint 2007/IIS 7/Windows 7
      Firefox 3.6.9/RHEL 5

  21. Wiss says:

    You’re the best, resolved my issue with Proxy authentication for 500 users.

    Cheers

    Wiss

  22. Excellent!! Did you know that you can install Firefox in wine and if you are logged in a Windows domain using Samba you can use NTLM in Firefox in LINUX??

    Regards,
    Carlos

  23. Alexander M. Batishchev says:

    Thanks a lot! Awesome! But.. does it support wildcards?

  24. Chris says:

    @Alexander it seems wildcards dont work, I just tried it with no luck

  25. Andy says:

    Nice, I’ve been looking for way to stop those annoying pop ups. Great job!

  26. Ronnie says:

    Do I use cscript.exe to run the script in a Windows environment?

  27. BoyJorge says:

    Matt, this is wonderful!

    Would this work for FireFox 4? I tried running the VBS script but the config values remain the same. Thanks!

  28. MarkS says:

    I am having a problem with Just using the Front Part of a Server Name, as this is on an Internal Network – No Domain is presented.

    http://MyServer, in the Field i use just “MyDomain.com,MyServer” and still prompts for my Credentials any Help Greatly Appreciated.

  29. Ronnie says:

    Awesome script thank you very much. Any chance on creating one that can modify the home page or point me in the direction of one, been unable to find one so far.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre>