"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.


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. Pingback: “Logon failure: unknown username or bad password.” when trying to access Windows XP share from Windows 7 « small_strong

  2. pete.d says:

    "By any chance – do you know which update caused this?"

    Unfortunately, I don't think there's any one update that's responsible. Seems like a bug in Windows to me. The original article was from two years ago, and yet I and others are just now running into the issue, in spite of having been running Windows 7 just fine all this time without problems connecting to our older XP machines until just recently.

    It seems that it's probably not an intentional change in the security settings, but rather just that something's screwed up with the update system that occasionally causes this setting to become undefined.

    Thank goodness folks like "johnny" post these solutions so that at least when we put in the right search terms, we can find them! :) (It took me a few tries before I used a search that turned up the right articles, and even then this article was the fifth or sixth I looked at before finding something actually relevant to my problem).

  3. MediaDog says:

    While this worked for the problem case I had, I suspect there is something on the XP side that was causing it. All my Win7 machines could see all my XP machines except one; and all of my XP machines could see that machine fine. As far as I can tell the settings on all the XP machines are identical, but that one machine needed this setting changed in the Win7 boxes before they could talk to it. The interesting thing is I had just done a windoze update on that one XP machine - so maybe the change was on the XP side, not the Win7 side.

  4. MediaDog says:

    Aha - the XP machine in question had it's clock way off. An MS article about this:


    says that "This behavior occurs when NTLM version 2 (NTLMv2) is used for authentication and when there is a time difference of more than 30 minutes between the local Windows XP computer and the remote Windows XP computer."

    So I suspect johnny is correct and that when the Win7 machines had an undefined security policy, they use NTLMv2, which caused the failure with the one XP system with a bad time.

  5. Abdi says:

    Thanks alot
    my problem is gon now

  6. Ron Gorman says:

    Johnny - thank you, thank you, THANK YOU!! I've spent a week pulling every hair out of my head trying to log in to my Windows 2000 computer from my Windows 7 computer. I'm guessing now that it was the Daylight Saving Time change that caused my problem in the first place. And shame on Microsoft for allowing such a dopey and esoteric bug. But Johnny, you ROCK! :)

  7. Adam says:

    This takes care of the time issue for me if I can not change the time on a Linux server since I don't have permission to do so. Thanks for this!

  8. Pradeep Gammampila says:


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

    It is working ......Keep it up

    Thanks Macho......

  9. Syed Umair says:

    Its Good ,

    My Problem solved

    Thanks you sooo Much :)

  10. sameer gupta says:

    thank u so much ...it is very helpful

  11. tony says:

    I had two days trying everything possible, and this was the problem. Thank's so much for posting this online.

  12. prashanth says:

    your solution helped me to solve one of my customers problem

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>