none
Logon Failure: The target account name is incorrect

    Question

  • I'm managing a small business domain with a W2K R2 server.  I've got 2 Windows 7 Pro PCs on the domain as well as 4 XP Pro PCs.  One of the Windows 7 PC is giving me fits.  It's got a printer that needs to be shared out.  Up until 2 days ago, the printer was working fine.  Then all of a sudden, no one can connect to it.  If you try to browse to the PC by \\pcname, you get the "Logon Failure: The target account name is incorrect".  I've tried removing the PC from the domain, deleting the PC name and renaming the PC, and then putting it all back.  And then it works for about 15 to 20 minutes, and the stops working again.  I shared out the c:\Windows\System32\spool\PRINTERS directory and gave domain user full control of that folder.  That worked for about another 15 minutes, and the quite again.  The folder is still shared out, but no one can access it.  Not even the domain admin.

    Thursday, March 25, 2010 8:48 PM

Answers

  •  

    Hi,

     

    Based on my research, please refer to the following article to troubleshoot the issue first.

     

    Logon failure: the target account name is incorrect

     

    Please Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

     

    If the issue persists, please also temporarily turn off firewall on the machine and create a new domain account to login on the machine for a test.

     

    Thanks,

    Novak

    • Marked as answer by Novak Wu Tuesday, April 6, 2010 2:28 AM
    Monday, March 29, 2010 6:01 AM

All replies

  •  

    Hi,

     

    Based on my research, please refer to the following article to troubleshoot the issue first.

     

    Logon failure: the target account name is incorrect

     

    Please Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

     

    If the issue persists, please also temporarily turn off firewall on the machine and create a new domain account to login on the machine for a test.

     

    Thanks,

    Novak

    • Marked as answer by Novak Wu Tuesday, April 6, 2010 2:28 AM
    Monday, March 29, 2010 6:01 AM
  • disable IPv6 in Local Area connection Properties and delete IPv6 Host (AAAA) in DNS server Manager.
    • Proposed as answer by NSF Admin Thursday, June 1, 2017 9:15 PM
    Thursday, June 16, 2011 12:40 AM
  • Try using the full path  for instance instead \\pcname  put in \\pcname.domain.local
    • Proposed as answer by DRubin007 Wednesday, June 6, 2012 7:46 PM
    Friday, February 10, 2012 11:49 PM
  • If you are stil not fixed:

    Check the machines DNS Suffix and NETBIOS Computer Name dialog (Under Computer Domain Changes dialog, which is under System Propteries) and make sure it is NOT blank and that the Change Primary DNS Suffix when domain membership changes check box is checked.

    If both of these are blank the Service Principal Name (SPN) of the machine will only be the short name. Setspn -l computername will show you the current status of the SPN (pronounced Spins). If you don't see any with FQDN's, that is a problem.

    A common machine should look something like this:

    setspn -l rodney-hp
    Registered ServicePrincipalNames for CN=RODNEY-HP,OU=Workstations,DC=domain,DC=com:
            RestrictedKrbHost/RODNEY-HP
            HOST/RODNEY-HP
            RestrictedKrbHost/RODNEY-HP.domain.com
            HOST/RODNEY-HP.domain.com

    Add in the DNS Suffix, check the box, reboot.

    BAM you can now get to UNC paths on the computer. Setspn -l computername wil now show double the number of entires, one short name based, one FQDN based.

    Rodney R. Fournier - Microsoft.com

    Senior Premier Field Engineer

    Active Directory – Platforms - Security


    Give me NNTP or give me death

    Tuesday, June 19, 2012 7:16 PM
  • I had this issue as well. I read this thread to help resolve it however none of the previous answers were the solution. 

    My fix was that there was an improper DNS Host(A) record. The record had the correct PC name however the incorrect IP which went to another machine. When I tried to access the machine by the UNC it would try and use that PC name to access the incorrect PC because it had the incorrect IP. (I know that explanation isn't very clear). I tested this by accessing the PC by IP for that PC which was obtained by pinging the PC-NAME. (UNC to the pc's C:\ drive, from run \\PC-IP\C$) from here I was able to determine the PC I was accessing was different from the one I wanted by the contents of the C:\drive. 

    To correct this is simply removed the DNS record from the DNS manager. Then from the Client PC I ran "IPCONFIG /FLUSHDNS" and then "IPCONFIG /REGISTERDNS" from an elevated command prompt. Then did the same from my PC to clear the DNS Cache. I then verified the new record with the correct IP was shown in the DNS records. You can do this by running "NSLOOKUP PC-NAME" from command line.

    You can also add the DNS record manually to the DNS server however I prefer the previous method as you are less likely to make a mistake and you are likely to have better results in terms of the DNS record remaining correctly assigned to the PC and IP. 

    I was then able to access the PC by UNC without receiving the Logon Failure error. 

    • Proposed as answer by Knowosielski Wednesday, December 26, 2012 8:47 PM
    Wednesday, December 26, 2012 8:44 PM
  • Try \\PCNAME.domain\Share$ instead of \\PCNAME\Share$ or better yet use the IP Address (\\10.20.30.40\share$); that should fix the problem.

    Thanks, Danny

    Wednesday, June 25, 2014 6:13 PM
  • None of the above worked for me.  What I figured out was that it was the UAC causing the problem.  When I turned this down and rebooted, I could connect to the pc.
    Thursday, March 19, 2015 8:17 PM
  • 100% DNS issue on our end. Customer has 2 very old servers handling DNS. We were in the process of decommission when a client reported they could no longer access a share directory on a computer. We found that the 2 servers had differing IP's. Matched them to the correct IP address and issue went away and QUICKLY working on an exit strategy.

    Monday, January 4, 2016 8:24 PM
  • @Knowosielski's post clued me in to the problem I was having.  In my case, I had a HOSTS file entry like this:

    127.0.0.1    ServerName.domain.com

    This was put in place to redirect locally originating queries for another web application to the local site. However, it also affects UNC path DNS lookup.  Who knew??

    Regards,

    Mike Sharp


    • Edited by rdcpro Thursday, September 15, 2016 9:21 PM minor edit
    Thursday, September 15, 2016 9:20 PM
  • Thank You so much, disabling the IPv6 works for me.

    Puneet Relhan

    Tuesday, January 17, 2017 10:38 AM
  • As this topic found when I had a similar issue I thought I would post my solution.

    My problem was while migrating PCs from one domain to another and having a mixture of PCs on new and old. when going to \\PC  on PCs on the old domain I would get the error, but going to \\PC.newdomain it worked.

    THe solution was to remove all trace of PC.olddomain in DNS and Active directory, propagate the changes to all network DNS servers, then either flushdns or reboot the problem PCs.

    I also went into group policy on the old domain and added the new one as an extra DNS suffix, but don't believe this bit was that important. Also ensure your DHCP server is issuing DNS servers on the new as well as the old domains.

    Thursday, February 16, 2017 1:38 PM
  • Try using the full path  for instance instead \\pcname  put in \\pcname.domain.local
    Best answer for me
    Wednesday, February 28, 2018 9:09 AM
  • Old Post but still shows up in google search.

    Cause for me was old computers still in AD and stale records had not cleared yet.

    DNS has an entry for 2 computers with same IP.

    Thursday, March 1, 2018 7:58 PM
  • Good one Mike, after trying every solution out there, your solution worked. I had installed WAMP server to install a WordPress site on my local machine, which I think wrote two entries in the local <g class="gr_ gr_158 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" data-gr-id="158" id="158">hosts</g> file

    127.0.0.1    ServerName

    ::1 ServerName

    Once in commented these two lines out, which I assume were redirecting my connection requests to the shared drive back to <g class="gr_ gr_439 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="439" id="439">local</g> site, everything worked like a charm!

    Thanks Mike


    Saturday, December 1, 2018 12:52 PM
  • An old thread but it still happens.  For me, I just solved it by rebooting the server I had tried to connect to via SMB.  When I tried to RDP into the server, it wouldn't let me in.  So I managed to get the server to reboot and then it was fine after that.
    Saturday, April 20, 2019 3:08 AM