"Logon failure: unknown username or bad password." when trying to access Windows XP share from Windows 7

After a recent Windows Update I could no longer access the folders on my Windows XP file server. A window popped up asking for a username and password even though they are both the same on the two computers. The error message each time was "Logon failure: unknown username or bad password."

I typed in my username and password five times. It reached the point where I thought I had gone crazy and was typing in the wrong one: it kept on coming back to me with the dreaded "Logon failure: unknown username or bad password.".

I quickly returned to my senses and guessed something was up with the authentication between XP and Windows 7. A few Google searches later I found out that a Local Security Policy needs changing.

  • Open the Start menu
  • Type "Local Security Policy" in the search box
  • Open Local Security Policy
  • Navigate to "Local Policies" -> "Security Options" and then locate the entry named "Network security: LAN Manager authentication level". Double click on it.
  • In the dropdown list choose "Send LM & NTLM - use NTLMv2 session security if negotiated
  • Click OK

It seems that a recent Windows Update has changed that policy's settings to be undefined, which —from what I can tell— forces NTLMv2 session security always. My XP installation mustn't have NTLMv2 capability and that is why I kept seeing "Logon failure: unknown username or bad password." errors.

After changing the local policy I was immediately able to connect to my network shares again.

Links

About johnny

Computers have interested me since I can remember and conveniently I studied computer science. I also enjoy performing in a local amateur theatre group and cycling. This is where I post solutions to problems I've had in the office or any other project, hopefully clearly enough to refer back to in the future.
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

62 Responses to "Logon failure: unknown username or bad password." when trying to access Windows XP share from Windows 7

  1. Ted says:

    That was it!!! after tons of searching this did the trick!

    Thanks,
    Ted

  2. Guy says:

    THANK YOU!!! after 5 hours this was the one that fixed it!

  3. musiclover408 says:

    I just got a new Windows 7 laptop and am trying to connect my printer to it through my wireless network on another PC running Windows Vista Business. Windows 7 finds the other computer in the network sharing but when I try to search for a printer, nothing comes up. When I try to browse for the printer it pops up a box to enter in a password. After entering it, I get the same message that you posted above. I did what you suggested on the Vista desktop but am still getting that message on the laptop. ANY IDEAS????

  4. Alex Hagen says:

    That worked for me too, after spending several hours looking. Thanks.

  5. johnny says:

    Try following the steps on the Windows 7 laptop: it's Windows 7 that is refusing to authenticate against Windows Vista. If that doesn't work I have no idea, sorry.

  6. steve d says:

    My thanks goes out to you johnny, after re-installing windows 7 twice, running updates, many google searches, etc etc. This finally fixed my problem.

    The crazy thing is that this policy was 'undefined' by default. Bill has done a good job on 7 this time round, but issues like this should not be present on fresh installs.

    regards, steve

  7. V.H. says:

    Thank you so much ... after lots of search finally it worked .
    thank you ,thank you , thank you ...

  8. b_f says:

    works ! nice info - thank you

  9. El PiPiL says:

    WoW... Finally after doing a vast amount of searching the immense world of the WWW ... found it ... Thanks ever so much for the information provided ... it worked. Thank The Sun for people smart enough to work out these bloody M$ problems...

    Thanks so much again!

  10. azs says:

    Thanks very much. I wasted 1 hour looking for this. Does anyone know why Microsoft did this?

  11. ritu says:

    Hey thanks a ton.. It helped :)

  12. dougp says:

    Fantastic advice - this also did it for me . Thanks a million!!!
    I spent three weeks of spare minutes/hours trying to get to the bottom of this same issue. You are a star!
    Does anyone have the address where I can invoice Microsoft for my time? :-)

  13. Srikant says:

    Just change your time and time zone. It solves your problem.

  14. Kyle says:

    Nice ... Nice ... Real Nice!

  15. Pingback: ویندوز سون به اکس پی کانکت نمی شه

  16. Eric says:

    Holy mother of god! It worked! I don't know where you found it on google, but I found your solution googling. My Win7 was a fresh installation and I had the same problem.

  17. Ben sampson says:

    Thanks. Saved me a headache

  18. David says:

    Thank you. After lots of searching the information you had did the trick. Thank you!

  19. turgut fincan says:

    thank you.this solved my problem.

  20. David James says:

    Why does Microsoft trip their users up like this and then make them feel like idiots?

  21. george says:

    thank you. This also worked well between w7 and server 2003.

  22. Jesus says:

    Thank You Very Much. that was the solution that i was looking for... I had tried a lot of "solutions" like changing the time and to have the same user and password in the computers... Once again... Thanks :)

  23. Adam says:

    Thank you for being born. While I had a different problem--I couldn't perform remote debugging using Visual Studio 2008 because I kept getting the same logon failure when I was trying to connect from a computer on a domain to a workgroup computer--the solution was what you described. Thanks again!

  24. soiltpain says:

    thank you very much for hint!

  25. Huy says:

    Thank you very much, I was looking for solution of problem for long time but they are not work. Luckily, I find your solution, so nice, thanks again!

  26. Home Premium says:

    If you're using the "Home Premium" version of Windows 7/Vista, you probably don't have the "Local Security Policy" snap-in. In this case you need to make the change manually in the registry. See this TechNet article for details:

    http://technet.microsoft.com/en-us/library/cc960646.aspx

    If you're not familiar with editing the Windows registry by hand, do a Google search. :-)

  27. Neelanshu Jain says:

    Thanks a lot !!!!

    After tons of searches this has helped me....

  28. Giri says:

    Thank you very much........

  29. Ivo says:

    This had me stumped all morning! Thanks so much! Now I can finally go to lunch!

  30. Long says:

    I tried to make this change on the XP machine, the machine that is hosting the printer, and I still getting the error message on the Window 7 machine. I don't know how to make this change on the Window 7 machine, because I can't find Local Security Policy on Window 7. Can anyone provide a step by step on making the change on the Window 7 Machine for this? Thanks.

  31. Rajesh says:

    Thanks by Ajay

  32. Svetoslav Batsoev says:

    Blah. This solution works for everyone but not me. I really don't know what to do now.

  33. Svetoslav Batsoev says:

    Found the solution for me:

    Start the Microsoft Management Console (MMC) Local Security Policy snap-in (Start, Control Panel, Administrative Tools, Local Security Policy).
    Expand the Local Policies branch.
    Select Security Options.
    Double-click "Network access: Sharing and security model for local accounts.”
    Select “Classic-Local users authenticate as themselves”, and click OK.

  34. Pingback: NetzwergBlog - Dennis Körner » Blog Archiv » Zugriff auf Freigabe auf XP-Rechner von Windows 7 nicht möglich – Was tun?

  35. Eddie says:

    unbelievable. this is invaluable. it took me a day to figure out to go to the GLOBAL POLICY editor to open the local for THIS option. I was going directly to just the local but I may have been taking it too literally. Either way after going into gpedit then to local I was able to get this option to come up, and sure enough this did the trick. Its amazing though because this was not an issue a couple months ago. Thanks!

  36. faizaal says:

    thanks budd surberb

  37. Pingback: Windows Xp de paylaşılan klasöre, Windows 7 üzerinden erişememek « Tamamen Kişisel

  38. Brajendu Kumar Das says:

    thanks ..it worked for me....best solution....

  39. Gaovan says:

    if this won't work like it did to me. try running the program as administrator..

  40. Thank God you Knew the solution for this issue. Very helpfull. Gracias!

  41. imran says:

    Thank you very much….

  42. Easwaran M says:

    Thats Great!!!

    Its working good..

    Thanks..

  43. Prem Soni says:

    Hey Thanks a lot posting this solution. I was facing this error on Win-7 PC since 2 days and now I got it fixed after going through this process.

    Thanks a ton.

    --
    Prem Soni

  44. Prem Soni says:

    The same trick for Windows Vista Home Edi...

    1 . Open registry editor ( Start search - regedit)
    2 . Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    3. Create a new DWORD value with the following properties:
    NAME: LmCompatibilityLevel
    VALUE: 1
    4. Restart your PC and try the connection again...

  45. Matthew Sugarman says:

    You hit the nail on the head for me (though my issue is between 2 identical copies of Windows 7 Home Premium.) Unfortunately, Home Premium does not have Local Security Policy, so I was forced to create a DWORD value in the registry.

    However, there's no change.

    By any chance - do you know which update caused this? I'm sure rolling back the update will not revert the settings back to normal, but I'd be able to avoid that one for now.

    Incidentally, I KNOW it was an update that caused the issue. I performed a clean install and it was perfect until the last batch of updates performed. I have no choice but to do it again, but this time I would know which to delay.

  46. thx man... it's ton of thank you...

  47. Jeff says:

    Thank you for taking the time to post this. Unfortunately, none of the solutions listed in your article or in the comments work for me. I am trying to map from a Win7 pro machine to an XP Pro machine. Most of the settings people suggest are already set. The most frustrating thing for me is that I can map network drives while connected via Ethernet but I get the username/password error when using or mapping a drive over wireless! Same network, same machine but it doesn't work, and it's driving me mad. Has anyone else encountered this sort of thing?
    Incidentally, the shares on the Win 7 machine are available to the XP machine regardless of the Win 7 connection type. The problem is when trying to map to an XP share from Win 7.

  48. Raj @Android Edition says:

    I am using Holistix monitoring application and have got the same issue, any help for solving this one..

  49. Thomas says:

    Thanks so much... tried to perform remote debugging. Now it works.

  50. Vicky Andika says:

    thank my friend..i had been looking for a sniper and you fixed it for me man thank you

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>