Password in user settings is no longer valid I have a 2010 Macbook pro 13 " .. 7 .. The upgradable one .. It has 8 GB RAM and  new battery. It is running the latest version of the macOS --  High Sierra, and is running great, but it sort of slowed down a bit. The usual sign that someone is maybe trying something, so I re-started the machine. Put in the name and password and all went well!

After running OK for a while I discovered that it went into sleep mode, rather earlier than I normally have it set.

I went into energy saver preferences. Indeed it was now set to go to sleep quickly. To change anything I need to enter the administrator and the password.

I discovered that I no longer have a valid password for it!

That is quite a surprise! I tried all sort of past passwords to no joy!

Anyone have an answer to this problem??

When the machine is hot and you switch it off and then on again it will not charge the battery!

I read all sort of stuff about resetting whatever it was, but nothing worked!

Quite by accident I noticed that it started charging after cooling down a bit.

These days If I have been using it elsewhere I shove it in the freezer for 5 minutes and it works fine!
It seems with heat issues, you'll want to make a very good backup at night after it's been cool or off all day and then wipe it and test if you can rely on this hardware.

The software can't possibly work when the hardware is throttling or stopping the processing. Without charging circuitry - you can't really use a portable Mac. Also, it will be hard to separate a shut down due to SMC failing to sense proper charge / voltage and this might have nothing to do with normal sleep.

Looking at this from the outside, I'd start with a clean install to see if you can confirm all the symptoms are directly or related to hardware.