• user密码


    一、修改密码

    1. alter user hr identified by hr;
    2. password/passw hr;

    SYS@test>password hr
    Changing password for hr
    New password:
    Retype new password:
    Password changed

    二、11g默认密码区分大小写

    SYS@test>alter user hr identified by HR;

    User altered.

    Elapsed: 00:00:00.02
    SYS@test>conn hr/hr;
    ERROR:
    ORA-01017: invalid username/password; logon denied

    Warning: You are no longer connected to ORACLE.

    主要是有参数SEC_CASE_SENSITIVE_LOGON决定的。

    SYS@test>show parameter SEC_CASE_SENSITIVE_LOGON

    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    sec_case_sensitive_logon             boolean     TRUE

    参数的官方解释:

    SEC_CASE_SENSITIVE_LOGON

    Property
    Description

    Parameter type
    Boolean

    Default value
    true

    Modifiable
    ALTER SYSTEM

    Range of values
    true | false

    Basic
    No

    SEC_CASE_SENSITIVE_LOGON enables or disables password case sensitivity in the database.

    Values:

    • true

      Database logon passwords are case sensitive.

    • false

      Database logon passwords are not case sensitive.

    三、密码有效期

    SYS@test>select * from dba_profiles where profile='DEFAULT';

    PROFILE                        RESOURCE_NAME                    RESOURCE LIMIT
    ------------------------------ -------------------------------- -------- ----------------------------------------
    DEFAULT                        COMPOSITE_LIMIT                  KERNEL   UNLIMITED
    DEFAULT                        SESSIONS_PER_USER                KERNEL   UNLIMITED
    DEFAULT                        CPU_PER_SESSION                  KERNEL   UNLIMITED
    DEFAULT                        CPU_PER_CALL                     KERNEL   UNLIMITED
    DEFAULT                        LOGICAL_READS_PER_SESSION        KERNEL   UNLIMITED
    DEFAULT                        LOGICAL_READS_PER_CALL           KERNEL   UNLIMITED
    DEFAULT                        IDLE_TIME                        KERNEL   UNLIMITED
    DEFAULT                        CONNECT_TIME                     KERNEL   UNLIMITED
    DEFAULT                        PRIVATE_SGA                      KERNEL   UNLIMITED
    DEFAULT                        FAILED_LOGIN_ATTEMPTS            PASSWORD 10
    DEFAULT                        PASSWORD_LIFE_TIME               PASSWORD 180
    DEFAULT                        PASSWORD_REUSE_TIME              PASSWORD UNLIMITED
    DEFAULT                        PASSWORD_REUSE_MAX               PASSWORD UNLIMITED
    DEFAULT                        PASSWORD_VERIFY_FUNCTION         PASSWORD NULL
    DEFAULT                        PASSWORD_LOCK_TIME               PASSWORD 1
    DEFAULT                        PASSWORD_GRACE_TIME              PASSWORD 7

    取消限制--防止应用用户的密码过期被锁问题。

    SYS@test>alter profile default limit password_life_time UNLIMITED;

    Profile altered.

    Elapsed: 00:00:00.04

    四、强制密码复杂度

    1. sys用户

      SYS@test>@?/rdbms/admin/utlpwdmg

      Function created.

      Elapsed: 00:00:00.06

      Grant succeeded.

      Elapsed: 00:00:00.03

      Profile altered.

      Elapsed: 00:00:00.02

      Function created.

      Elapsed: 00:00:00.01

      Grant succeeded.

      Elapsed: 00:00:00.02

      主要是创建函数verify_function_11G,有兴趣可以看看创建脚本。

    2. 启用
      11g  --alter profile default limit password_verify_function verify_function_11g;

    10g  --alter profile default limit password_verify_function verify_function;

    SYS@test>alter profile default limit password_verify_function verify_function_11g;

    Profile altered.

    Elapsed: 00:00:00.02
    SYS@test>passw hr
    Changing password for hr
    New password:
    Retype new password:
    ERROR:
    ORA-28003: password verification for the specified password failed
    ORA-20001: Password length less than 8

    Password unchanged

         3.禁用
             alter profile default limit password_verify_function null;

  • 相关阅读:
    sqlite 修改 id 自增值
    欧拉图与哈密顿图12:22
    nps 配置 vnc内网穿透
    0 范数、1 范数、2 范数有什么区别?
    相关测试
    golang学习笔记---channel(通道)
    golang学习笔记---pflag包
    Nginx+Keepalived配置Nginx自动启动和7*24不间断服务
    Keepalived+Nginx双机主备配置实践
    虚拟机中使用域名通过宿主window访问
  • 原文地址:https://www.cnblogs.com/afx1007/p/4065949.html
Copyright © 2020-2023  润新知