If you're doing that remotely, enter
Safe Mode first so that if you accidentally lock you out, those changes are rolled back.
Don't forget to exit safe mode properly if everything works, as if you intentionally log out with safe mode on changes would be rolled back.