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;

 

转载于:https://www.cnblogs.com/afx1007/p/4065949.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值