You can factory reset a PlayStation 4 from your console's dashboard and via safe mode on your console.
To do a PlayStation password reset, you'll need to go to the "Account Management" section of your PS4's Settings.