Change the master password to +new_master_password+. Note that we don't take a password confirmation here.
 This is up to a UI layer.
164781
def change_password!(new_master_password)
      self.class.password_policy.validate!(new_master_password)

      @backend.transaction{
        # Decrypt each key and value with the old master password and encrypt them with the new master password
        copy = {}
        @backend[:user].each{|k,v|
          # No need to (de)serialize - the value comes in as JSON and goes out as JSON
          new_key = Encryptor.encrypt(decrypt(k), :key => new_master_password)
          new_val = Encryptor.encrypt(decrypt(v), :key => new_master_password)
          copy[new_key] = new_val
        }

        # re-write user branch with newly encrypted keys and values
        @backend[:user] = copy

        # from now on, use the new master password as long as the object lives
        @master_password = new_master_password

        timestamp!(:last_modified)
        @backend[:system][:salt] = encrypt(Random.rand.to_s)
      }
    end
720978
public function changePassword()
    {
        if (!\OxidEsales\Eshop\Core\Registry::getSession()->checkSessionChallenge()) {
            return;
        }

        $oUser = $this->getUser();
        if (!$oUser) {
            return;
        }

        $sOldPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('password_old', true);
        $sNewPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('password_new', true);
        $sConfPass = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('password_new_confirm', true);

        /** @var \OxidEsales\Eshop\Core\InputValidator $oInputValidator */
        $oInputValidator = \OxidEsales\Eshop\Core\Registry::getInputValidator();
        if (($oExcp = $oInputValidator->checkPassword($oUser, $sNewPass, $sConfPass, true))) {
            switch ($oExcp->getMessage()) {
                case 'ERROR_MESSAGE_INPUT_EMPTYPASS':
                case 'ERROR_MESSAGE_PASSWORD_TOO_SHORT':
                    return \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay(
                        'ERROR_MESSAGE_PASSWORD_TOO_SHORT',
                        false,
                        true
                    );
                default:
                    return \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay(
                        'ERROR_MESSAGE_PASSWORD_DO_NOT_MATCH',
                        false,
                        true
                    );
            }
        }

        if (!$sOldPass || !$oUser->isSamePassword($sOldPass)) {
            /** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */
            $oUtilsView = \OxidEsales\Eshop\Core\Registry::getUtilsView();

            return $oUtilsView->addErrorToDisplay('ERROR_MESSAGE_CURRENT_PASSWORD_INVALID', false, true);
        }

        // testing passed - changing password
        $oUser->setPassword($sNewPass);
        if ($oUser->save()) {
            $this->_blPasswordChanged = true;
            // deleting user autologin cookies.
            \OxidEsales\Eshop\Core\Registry::getUtilsServer()->deleteUserCookie(\OxidEsales\Eshop\Core\Registry::getConfig()->getShopId());
        }
    }
804439
def change_password
    unless current_user
      bounce_user
      return
    end

    @credential = current_user.credentials.
                               where(type:  'Credentials::Password').first
    if @credential
      # An old password is set, must verify it.
      if @credential.check_password params[:credential][:old_password]
        success = @credential.update_attributes change_password_params
      else
        success = false
        flash[:alert] = 'Incorrect old password. Please try again.'
      end
    else
      @credential = Credentials::Password.new change_password_params
      @credential.user = current_user
      success = @credential.save
    end
    respond_to do |format|
      if success
        format.html do
          redirect_to session_url, notice: 'Password updated'
        end
        format.json { head :no_content }
      else
        format.html { render action: :password_change }
        format.json { render json: { error: :invalid } }
      end
    end
  end
666426
def set_password(self, password):
        
        self.password = Security.hash(password)
        self.save()
659542
def updatePassword(self,
                       user,
                       currentPassword,
                       newPassword):
        """"""
        return self.__post('/api/updatePassword',
                           data={
                               'user': user,
                               'currentPassword': currentPassword,
                               'newPassword': newPassword
                           })
327537
public function changePassword($password_token, $new_password)
	{
		if ($this->checkPasswordToken($password_token)) {
			$this->password                     = $new_password;
			$this->attributes['password_token'] = null;
			FuzzAuthUserProvider::revokeSessionsForOwnerTypeAndId('user', $this->{$this->getKey()});

			return true;
		}

		return false;
	}
545464
def change_password(self, new_password, email):
        
        log.info("[+] Changing the password of the account")
        return self._send_xmpp_element(account.ChangePasswordRequest(self.password, new_password, email, self.username))
478251
def set_account_password(self, account, raw_password):
        
        luser = self._get_account(account.username)
        changes = changeset(luser, {
            'password': raw_password,
        })
        save(changes, database=self._database)
416213
def set_password(self, raw_password):
        
        if raw_password is None:
            self.set_unusable_password()
        else:
            xmpp_backend.set_password(self.node, self.domain, raw_password)
707443
def reset_password(self, user, password):
        
        user.password = password
        self.user_manager.save(user)
        if app.config.SECURITY_SEND_PASSWORD_RESET_NOTICE_EMAIL:
            self.send_mail(
                _('flask_unchained.bundles.security:email_subject.password_reset_notice'),
                to=user.email,
                template='security/email/password_reset_notice.html',
                user=user)
        password_reset.send(app._get_current_object(), user=user)
1061787
public void changePassword(final String oldPassword,
            final String newPassword) {

        final Authentication currentUser =
                SecurityContextHolder.getContext().getAuthentication();
        final String username = currentUser.getName();

        if (authenticationManager == null) {
            logger.debug(
                    "No authentication manager set. can't change Password!");

            return;
        } else {
            logger.debug("Re-authenticating user '" + username
                    + "' for password change request.");

            authenticationManager.authenticate(
                    new UsernamePasswordAuthenticationToken(username,
                            oldPassword));
        }

        logger.debug("Changing password for user '" + username + "'");

        final SecurityUser user = (SecurityUser) loadUserByUsername(username);

        user.setPassword(passwordEncoder.encode(newPassword));
        users.add(user);
    }
181126
def change_password(self, new_password):
        

        if self.session.campus == HF:
            raise ValueError('合肥校区使用信息中心账号登录, 修改教务密码没有作用')
        # 若新密码与原密码相同, 直接返回 True
        if new_password == self.session.password:
            raise ValueError('原密码与新密码相同')

        result = self.query(ChangePassword(self.session.password, new_password))
        if result:
            self.session.password = new_password
        return result
647784
def change_db_user_password(username, password):
    """"""

    sql = "ALTER USER %s WITH PASSWORD '%s'" % (username, password)
    excute_query(sql, use_sudo=True)
1145439
def prompt_for_new_password():
    
    while True:
        passw = getpass.getpass()
        passw2 = getpass.getpass()
        if passw == passw2: return passw
        print 'Passwords do not match'
570070
public function changePassword() {
    $this->requireTransaction();
    $session = $this->getSession();
    $permissionManager = $this->getPermissionManager();
    $request = $this->getRequest();
    $response = $this->getResponse();

    // load model
    $authUser = $this->principalFactory->getUser($session->getAuthUser());
    if ($authUser) {
      // add permissions for this operation
      $oidStr = $authUser->getOID()->__toString();
      $this->tempPermissions[] = $permissionManager->addTempPermission($oidStr, '', PersistenceAction::READ);
      $this->tempPermissions[] = $permissionManager->addTempPermission($oidStr.'.password', '', PersistenceAction::UPDATE);

      $this->changePasswordImpl($authUser, $request->getValue('oldpassword'),
          $request->getValue('newpassword1'), $request->getValue('newpassword2'));
    }
    // success
    $response->setAction('ok');
  }
162180
def password_change(self, request):
        
        from django.contrib.auth.views import password_change
        url = reverse('admin:cms_password_change_done')
        defaults = {
            'post_change_redirect': url,
            'template_name': 'cms/password_change_form.html',
        }
        if self.password_change_template is not None:
            defaults['template_name'] = self.password_change_template
        return password_change(request, **defaults)
150515
def update(self, password=values.unset):
        
        return self._proxy.update(password=password, )