thought out of left field.
older computers that lost settings like passwords often needed the system backup battery replaced.
other than the passwords being lost the prime diagnostic symptom was erratic system clock behaviour.
set the clock time.
leave it turned off totally for a couple of hours
then see if the clock is keeping correct time on switch on.
it may be just a simple old fashioned fault.