コード例 #1
0
def status(inst, basedn, log, args):
    dn = _get_arg( args.dn, msg="Enter dn to check")
    accounts = Accounts(inst, basedn)
    acct = accounts.get(dn=dn)
    acct_str = "locked: %s" % acct.is_locked()
    log.info('dn: %s' % dn)
    log.info(acct_str)
コード例 #2
0
def reset_password(inst, basedn, log, args):
    dn = _get_arg(args.dn, msg="Enter dn to reset password")
    new_password = _get_arg(args.new_password, hidden=True, confirm=True,
        msg="Enter new password for %s" % dn)
    accounts = Accounts(inst, basedn)
    acct = accounts.get(dn=dn)
    acct.reset_password(new_password)
    log.info('reset password for %s' % dn)
コード例 #3
0
def change_password(inst, basedn, log, args):
    dn = _get_arg(args.dn, msg="Enter dn to change password")
    cur_password = _get_arg(args.current_password, hidden=True, confirm=False,
        msg="Enter current password for %s" % dn)
    new_password = _get_arg(args.new_password, hidden=True, confirm=True,
        msg="Enter new password for %s" % dn)
    accounts = Accounts(inst, basedn)
    acct = accounts.get(dn=dn)
    acct.change_password(cur_password, new_password)
    log.info('changed password for %s' % dn)
コード例 #4
0
def unlock(inst, basedn, log, args):
    dn = _get_arg( args.dn, msg="Enter dn to check")
    accounts = Accounts(inst, basedn)
    acct = accounts.get(dn=dn)
    acct.unlock()
    log.info('unlocked %s' % dn)
コード例 #5
0
ファイル: account.py プロジェクト: 389ds/389-ds-base
def entry_status(inst, basedn, log, args):
    dn = _get_dn_arg(args.dn, msg="Enter dn to check")
    accounts = Accounts(inst, basedn)
    acct = accounts.get(dn=dn)
    status = acct.status()
    _print_entry_status(status, dn, log, args)
コード例 #6
0
ファイル: account.py プロジェクト: 389ds/389-ds-base
def unlock(inst, basedn, log, args):
    dn = _get_dn_arg(args.dn, msg="Enter dn to unlock")
    accounts = Accounts(inst, basedn)
    acct = accounts.get(dn=dn)
    acct.unlock()
    log.info(f'Entry {dn} is unlocked')