If you were able to boot to a USB installer, then I am guessing that you were also successful in erasing the drive and reinstalling whatever system version you got with the installer. (erase and install a clean system is always my recommendation on a used Mac, particularly when you don't know what the previous owner might have done to the system software.)