.. versionadded:: 2015.8.8

    Delete the password from name user

    CLI Example:

    .. code-block:: bash

        salt '*' shadow.del_password username
489105
def del_password(name):
    '''
    
    '''
    cmd = 'passwd -d {0}'.format(name)
    __salt__['cmd.run'](cmd, python_shell=False, output_loglevel='quiet')
    uinfo = info(name)
    return not uinfo['passwd']
558741
def remove(self, username, user_api, filename=None, force=False):
        """"""
        self.keys = API.__get_keys(filename)
        self.username = username
        user = user_api.find(username)[0]

        if not force:  # pragma: no cover
            self.__confirm()

        for key in self.__delete_keys():
            operation = {'sshPublicKey': [(ldap3.MODIFY_DELETE, [key])]}
            self.client.modify(user.entry_dn, operation)
636397
def delete(name, attributes):
    '''
    
    '''
    ret = {'name': name,
           'result': True,
           'comment': '',
           'changes': {}}

    if not os.path.exists(name):
        ret['result'] = False
        ret['comment'] = "File or directory doesn't exist"
        return ret

    current_attrs = __salt__['xattr.list'](name)
    current_ids = current_attrs.keys()

    for attr in attributes:

        if attr in current_ids:
            __salt__['xattr.delete'](name, attr)
            ret['changes'][attr] = 'delete'

    if not ret['changes']:
        ret['comment'] = 'All attributes were already deleted.'

    return ret
643269
def delete(event, saltenv='base', test=None):
    '''
    
    '''
    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__,
            listen=True)

    master_key = salt.utils.master.get_master_key('root', __opts__)

    __jid_event__.fire_event({'event': event, 'key': master_key}, 'salt/reactors/manage/delete')

    res = sevent.get_event(wait=30, tag='salt/reactors/manage/delete-complete')
    return res['result']
668406
def delete(key, options = {})
      info = Utils.build_info(key, options)

      command "delete-generic-password",
        "-a", info[:account_name],
        "-s", info[:service_name],
        "-l", info[:label],
        "-D", info[:kind],
        "-C", info[:type]
    end
697838
def delete_user(self, uid=0, user_id=''):
        
        if not uid:
            users = self.get_users()
            users = list(filter(lambda x: x.user_id==str(user_id), users))
            if not users:
                return False
            uid = users[0].uid
        command = const.CMD_DELETE_USER
        command_string = pack('h', uid)
        cmd_response = self.__send_command(command, command_string)
        if not cmd_response.get('status'):
            raise ZKErrorResponse("Can't delete user")
        self.refresh_data()
        if uid == (self.next_uid - 1):
            self.next_uid = uid
156659
def admin_password(self, environment, target_name, password):
        
        try:
            remote_server_command(
                ["ssh", environment.deploy_target,
                    "admin_password", target_name, password],
                environment, self,
                clean_up=True
                )
            return True
        except WebCommandError:
            return False
1060504
def delete(zone):
    '''
    
    '''
    ret = {'status': True}

    # delete zone
    res = __salt__['cmd.run_all']('zonecfg -z {zone} delete -F'.format(
        zone=zone,
    ))
    ret['status'] = res['retcode'] == 0
    ret['message'] = res['stdout'] if ret['status'] else res['stderr']
    if ret['message'] == '':
        del ret['message']
    else:
        ret['message'] = _clean_message(ret['message'])

    return ret
1270387
def modify_user(self, username, data):
        
        if 'password' in data:
            # generate salt
            char_set = string.ascii_letters + string.digits
            data['pwd_salt'] = ''.join(random.choice(char_set) for x in range(8))
            data['pwd_hash'] = self._gen_hash(data['password'], data['pwd_salt'])
            del(data['password'])

        sql = "UPDATE user SET "
        sql += ', '.join("%s = ?" % k for k in sorted(data))
        sql += " WHERE username = ?"

        vals = []
        for k in sorted(data):
            vals.append(data[k])
        vals.append(username)

        try:
            self._db_curs.execute(sql, vals)
            self._db_conn.commit()
        except (sqlite3.OperationalError, sqlite3.IntegrityError) as error:
            raise AuthError(error)
1000907
def delete_user_password!(username)
      user_password = self.passwords.select { |sw_pw| sw_pw.username == username.to_s }

      unless user_password.empty?
        softlayer_client[:Software_Component_Password].object_with_id(user_password.first['id']).deleteObject
        @passwords = nil
      end
    end
292997
def delete_user(name, runas=None):
    '''
    
    '''
    if runas is None and not salt.utils.platform.is_windows():
        runas = salt.utils.user.get_user()
    res = __salt__['cmd.run_all'](
        [RABBITMQCTL, 'delete_user', name],
        reset_system_locale=False,
        python_shell=False,
        runas=runas)
    msg = 'Deleted'

    return _format_response(res, msg)
114513
function deleteUser(user) {
  if (!runningAsRoot()) return;
  if (!user) throw new Error('You must provide an username');
  if (!userExists(user)) {
    return;
  }
  const userdelBin = _safeLocateBinary('userdel');
  const deluserBin = _safeLocateBinary('deluser');

  if (isPlatform('linux')) {
    if (userdelBin !== null) { // most modern systems
      runProgram(userdelBin, [user]);
    } else {
      if (_isBusyboxBinary(deluserBin)) { // busybox-based systems
        runProgram(deluserBin, [user]);
      } else {
        throw new Error(`Don't know how to delete user ${user} on this strange linux`);
      }
    }
  } else if (isPlatform('osx')) {
    runProgram('dscl', ['.', '-delete', `/Users/${user}`]);
  } else if (isPlatform('windows')) {
    throw new Error('Don\'t know how to delete user in Windows');
  } else {
    throw new Error('Don\'t know how to delete user in current platform');
  }
}
1015531
def remove_from_user(self, name, *args):
        
        user = self.get_user(name=name)
        attrs_ = user['user']
        for a in args:
            del attrs_[a]
449481
def delete_user(self, name):
        
        self._api_delete('/api/users/{0}'.format(
            urllib.parse.quote_plus(name)
        ))
492701
def keypair_delete(name, profile=None, **kwargs):
    '''
    
    '''
    conn = _auth(profile, **kwargs)
    return conn.keypair_delete(name)
349167
def remove_user(self, name):
        
        try:
            cmd = SON([("dropUser", name)])
            # Don't send {} as writeConcern.
            if self.write_concern.acknowledged and self.write_concern.document:
                cmd["writeConcern"] = self.write_concern.document
            self.command(cmd)
        except OperationFailure as exc:
            # See comment in add_user try / except above.
            if exc.code in common.COMMAND_NOT_FOUND_CODES:
                coll = self._collection_default_options('system.users')
                coll.delete_one({"user": name})
                return
            raise
1238022
def delete_pool(hostname, username, password, name):
    '''
    
    '''

    ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}

    if __opts__['test']:
        return _test_output(ret, 'delete', params={
            'hostname': hostname,
            'username': username,
            'password': password,
            'name': name,
        }
        )

    #is this pool currently configured?
    existing = __salt__['bigip.list_pool'](hostname, username, password, name)
    # if it exists by name
    if existing['code'] == 200:

        deleted = __salt__['bigip.delete_pool'](hostname, username, password, name)
        # did we get rid of it?
        if deleted['code'] == 200:
            ret['result'] = True
            ret['comment'] = 'Pool was successfully deleted.'
            ret['changes']['old'] = existing['content']
            ret['changes']['new'] = {}

        # something bad happened
        else:
            ret = _load_result(deleted, ret)

    # not found
    elif existing['code'] == 404:
        ret['result'] = True
        ret['comment'] = 'This pool already does not exist. No changes made.'
        ret['changes']['old'] = {}
        ret['changes']['new'] = {}

    else:
        ret = _load_result(existing, ret)

    return ret