Como alterar a senha de um cliente no Magento 2 programaticamente
$customerId = 1; // ID do cliente
$password = "custom_password"; // nova senha para o cliente
$customer = $this->_customerRepositoryInterface->getById($customerId); // _customerRepositoryInterface is an instance of \Magento\Customer\Api\CustomerRepositoryInterface
$customerSecure = $this->_customerRegistry->retrieveSecureData($customerId); // _customerRegistry is an instance of \Magento\Customer\Model\CustomerRegistry
$customerSecure->setRpToken(null);
$customerSecure->setRpTokenCreatedAt(null);
$customerSecure->setPasswordHash($this->_encryptor->getHash($password, true)); // here _encryptor is an instance of \Magento\Framework\Encryption\EncryptorInterface
$this->_customerRepositoryInterface->save($customer);