Logon failure unknown username or bad password when connecting Windows 7 PC to Windows XP PC

I connected a new Windows 7 PC over a network to an old XP PC. I wanted to copy some files from the XP box to the new one, but kept getting getting an error:

Logon failure unknown username or bad password

I made sure I was using the correct domain and account, checked all the permissions and it all looked fine, but the Windows 7 box wouldn't connect.


The problem turned out to be the clock on the XP box. I hadn't used it for a while and the date was way out, which totally screwed up networking. As soon as the date and time were correct, the Windows 7 box connected fine.