Deprovision Linux user accounts that do not appear in account metadata.

    Args:
      remove_users: list, the username strings of the Linux accounts to remove.
772961
def _RemoveUsers(self, remove_users):
    
    for username in remove_users:
      self.utils.RemoveUser(username)
      self.user_ssh_keys.pop(username, None)
    self.invalid_users -= set(remove_users)
941472
def DeleteGRRUser(self, username, cursor=None):
    """"""
    cursor.execute("DELETE FROM grr_users WHERE username_hash = %s",
                   (mysql_utils.Hash(username),))

    if cursor.rowcount == 0:
      raise db.UnknownGRRUserError(username)
256820
def purge_configs():
    
    user_config = path(CONFIG_FILE_NAME, root=USER)
    inplace_config = path(CONFIG_FILE_NAME)

    if os.path.isfile(user_config):
        os.remove(user_config)

    if os.path.isfile(inplace_config):
        os.remove(inplace_config)
490802
def delete_user(self, username):
        
        path = Client.urls['users_by_name'] % username
        return self._call(path, 'DELETE')
367140
def DeleteUser(username):
  """"""
  grr_api = maintenance_utils.InitGRRRootAPI()
  try:
    grr_api.GrrUser(username).Get().Delete()
  except api_errors.ResourceNotFoundError:
    raise UserNotFoundError(username)
825565
def prune(self):
        
        target_user_ids = self.get_queryset().values_list('id', flat=True)
        exclude_user_ids = SentDrip.objects.filter(date__lt=conditional_now(),
                                                   drip=self.drip_model,
                                                   user__id__in=target_user_ids)\
                                           .values_list('user_id', flat=True)
        self._queryset = self.get_queryset().exclude(id__in=exclude_user_ids)
549062
def delete_unknown_user(_debug)
      @current_users.each do |cu|
        cu.drop unless @managed_users.any? do |mu|
          cu.user == mu.user && cu.host == mu.host
        end
      end
    end
1015367
def remove_credentials(self, credIDs):
        
        for credID in credIDs:
            cur = self.conn.cursor()
            cur.execute("DELETE FROM users WHERE id=?", [credID])
            cur.close()
380737
def delete(self, account_id, user_id):
        
        return self.connection.delete('account/access', account_id=account_id, user_id=user_id)
850709
def user_remove_prj(self, *args, **kwargs):
        
        if not self.cur_user:
            return
        i = self.user_prj_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            prj = item.internal_data()
            prj.users.remove(self.cur_user)
            item.set_parent(None)
1077240
def _delUserFromGroup(self, username, group="Clients"):
        
        portal_groups = api.portal.get_tool("portal_groups")
        group = portal_groups.getGroupById(group)
        group.removeMember(username)
519522
def remove_user(username):
    
    users = passwd_reader.load_users()

    assert username in users, "Username '%s' not found!" % username

    # remove user from passwd file
    del users[username]
    passwd_reader.save_users(users)

    # remove home directory
    home_dir = settings.DATA_PATH + username
    if os.path.exists(home_dir):
        shutil.rmtree(home_dir)

    reload_configuration()
1315279
def remove_user(config, group, username):
        """"""
        client = Client()
        client.prepare_connection()
        group_api = API(client)
        try:
            group_api.remove_user(group, username)
        except ldap_tools.exceptions.NoGroupsFound:  # pragma: no cover
            print("Group ({}) not found".format(group))
        except ldap_tools.exceptions.TooManyResults:  # pragma: no cover
            print("Query for group ({}) returned multiple results.".format(
                group))
        except ldap3.NO_SUCH_ATTRIBUTE:  # pragma: no cover
            print("{} does not exist in {}".format(username, group))
1314549
protected void removeInvalidLogins(String userName, String remoteAddress) {

        if (m_maxBadAttempts < 0) {
            // invalid login storage is disabled
            return;
        }

        String key = createStorageKey(userName, remoteAddress);
        // just remove the user from the storage
        m_storage.remove(key);
    }
971985
def remove_from_subscriptions(self, subscription):
        
        assert isinstance(subscription, github.Repository.Repository), subscription
        headers, data = self._requester.requestJsonAndCheck(
            "DELETE",
            "/user/subscriptions/" + subscription._identity
        )
768002
def delete(self, user, name):
        

        uri = self.client.remote + '/users/{}/feeds/{}'.format(user, name)

        resp = self.client.session.delete(uri)
        return resp.status_code
688716
def remove(*args)
      arguments(args, required: [:user, :repo, :number])
      params = arguments.params
      params['data'] = { 'assignees' => arguments.remaining } unless arguments.remaining.empty?

      delete_request("/repos/#{arguments.user}/#{arguments.repo}/issues/#{arguments.number}/assignees", params)
    end