With a factory reset, you can reset your device. However, it doesn't remove the password. That means you should enter the password to access the Samsung account even after the factory reset.