【翻译自mos文章】oraclepassword管理策略
oraclepassword管理策略
參考原文:
Oracle Password Management Policy (Doc ID 114930.1)
细节:
password管理通过使用profile来建立。
当password过期后,假设user有能力独立地从 end-user application(前台业务软件)改动password的话,通常的推荐是仅仅指派给这些schemas 一个profile,该profile有 password aging an expiration features 。
通常这意味着application(前台业务软件)必须正确的使用 OCIPasswordChange() OCI call 。比方sqlplus
一个profile 能够在指定password參数时被建立。然后把该profile指派给一个user
SQL> create profile custom limit failed_login_attempts 20;
Profile created.
SQL> alter user scott profile custom;
User altered.
oracle提供一个脚本( $ORACLE_HOME/rdbms/admin/utlpwdmg.sql)来实现 DEFAULT profile上的 password管理特性。
dba能够把它(该脚本)作为一个样例使用,以查看password management特性时怎么被enabled的。
复制该脚本并依据你的须要自定义该脚本,请在上生产之前測试该脚本(或者你自定义的脚本)
在oracle database profile中。有7个password管理的參数能够被指定。以下分别讨论:
1. Account Locking
当一个user 超过了指派给他的失败登陆次数(FAILED_LOGIN_ATTEMPTS),oracle db 会自己主动lock住该user的账户(account)。该lock的持续时间为PASSWORD_LOCK_TIME(该PASSWORD_LOCK_TIME是profile里边的resource)指定的时间。
Profile parameters:
FAILED_LOGIN_ATTEMPTS
PASSWORD_LOCK_TIME
2. Password Aging and Expiration
当超过了PASSWORD_LIFE_TIME中指定的时间之后。password会expire,然后 user or dba 必须改掉该password。A grace period(以天为单位,也就是PASSWORD_GRACE_TIME指定的period)能够被设置,以同意user 在passwordexpired之后直到 grace period 期间之内, 改变他们的password。
user 进入 grace period 期间的依据是:在他们的passwordexpired后。而且他们第一次登陆到db中的那个时刻。
在 grace period 期间之内, 在用户每一次登陆到db之后。都会显示一条warning的消息,该消息会持续出现,直到grace period expired。在grace period 期内,用户必须改动password,假设在grace period 期内不改动password。则该account expired 而且不会被同意登陆。直到password被改动。
注意: password不会也不能被locked。即使是因为 超过life time 和后来的 grace time。可是该user除非改动password,否则是不能login的。
Profile parameters:
PASSWORD_LIFE_TIME
PASSWORD_GRACE_TIME
3. Password History
user 不能重用原来password的时间间隔 就是 (PASSWORD_REUSE_TIME。该间隔能够以天为单位指定。
or a number of password changes the user must make before the current password can be reused (PASSWORD_REUSE_MAX).
--->看似这个PASSWORD_REUSE_MAX的含义是:在当前password能被重用之前,用户必须改变很多次password,也就是说PASSWORD_REUSE_MAX是指定的改password的次数?
4. Password Complexity Verification
dba能够使用PL/SQL建立自己的 password verification routines (password验证程序)。然后就能够让oracle db 使用该routine 来检查password复杂度。
Profile parameter:
PASSWORD_VERIFY_FUNCTION
sys拥有的PL/SQL function 必须遵守 以下的格式:
routine_name( userid_parameter IN VARCHAR2, password_parameter IN VARCHAR2, old_password_parameter IN VARCHAR2) RETURN BOOLEAN
默认的password验证函数在 $ORACLE_HOME/rdbms/admin/utlpwdmg.sql文件里。
该文件能够作为一个样例或者依据你的须要进行改动。
该函数能够被profile关联使用。
alter profile default limit password_verify_function <routine_name>;
禁用某 default profile上的password验证函数的方法例如以下:
SQL> alter profile default limit password_verify_function null;
password复杂验证一旦启用,用户能够通过非常多方法来改动他们自己的password:
第一个方法: sqlplus的password命令
SQL> connect scott/tiger
Connected.
SQL> password
Changing password for SCOTT
Old password:
New password:
Retype new password:
Password changed
SQL>
第二个方法:alter user 命令:
SQL> ALTER USER &MYUSERNAME IDENTIFIED BY &NEWPASSWORD REPLACE &OLDPASSWORD;
使用replace keyword的alter user 语法 是修复 bug 1231172方案的一部分,因此,该语法能够在当前全部支持的release上使用。
第三个方法:前台业务软件使用 OCIPasswordChange() call。
以下是一个样例:
-- A default password complexity function is provided.
-- This sample function makes no checks and always returns true.
-- The logic in the function should be modified as required.
-- See $ORACLE_HOME/rdbms/admin/utlpwdmg.sql for an idea of kind
-- of logic that can be used.
-- This function must be created in SYS schema.
-- connect sys/ as sysdba before running this.
-- This function will not check the provided password. It is just an example and
-- will return true for any password. For a real password verification routine see
-- script $ORACLE_HOME/rdbms/admin/utlpwdmg.sql.
CREATE OR REPLACE FUNCTION always_true (username varchar2,
password varchar2, old_password varchar2) RETURN boolean IS
BEGIN
RETURN(TRUE);
END;
/
-- This script alters the default parameters for Password Management.
-- This means that all the users on the system have Password Management
-- enabled and set to the following values unless another profile is
-- created with parameter values set to different value or UNLIMITED
-- is created and assigned to the user.
ALTER PROFILE DEFAULT LIMIT
PASSWORD_LIFE_TIME 60 -- (days)
PASSWORD_GRACE_TIME 10 --(days)
PASSWORD_REUSE_TIME 1800
PASSWORD_REUSE_MAX UNLIMITED
FAILED_LOGIN_ATTEMPTS 3 --(times)
PASSWORD_LOCK_TIME 1/1440 --(days)
PASSWORD_VERIFY_FUNCTION always_true;
【翻译自mos文章】oraclepassword管理策略的更多相关文章
- 【翻译自mos文章】11.2.0.4及更高版本号的asm实例中MEMORY_TARGET 和 MEMORY_MAX_TARGET的默认值和最小值
[翻译自mos文章]11.2.0.4及更高版本号的asm实例中MEMORY_TARGET 和 MEMORY_MAX_TARGET的默认值和最小值 来源于: Default and Minimum ME ...
- 【翻译自mos文章】job 不能自己主动执行--这是另外一个mos文章,本文章有13个解决方法
job 不能自己主动执行--这是另外一个mos文章 參考原文: Jobs Not Executing Automatically (Doc ID 313102.1) 适用于: Oracle Datab ...
- 【翻译自mos文章】多租户中的service管理
来源于: Service Management For Multitenant (文档 ID 2009500.1) APPLIES TO: Oracle Database - Enterprise E ...
- 【翻译自mos文章】改变数据库用户sysman(该用户是DB Control Repository 的schema)password的方法
改变数据库用户sysman(该用户是DB Control Repository 的schema)password的方法 參考原文: How To Change the Password of the ...
- 【翻译自mos文章】11gR2中的asm后台进程
11gR2中的asm后台进程 參考原文: ASM Background Processes in 11.2 (Doc ID 1641678.1) 适用于: Oracle Database - Ente ...
- 【翻译自mos文章】使用asmcmd命令在本地和远程 asm 实例之间 拷贝asm file的方法
使用asmcmd命令在本地和远程 asm 实例之间 拷贝asm file的方法 參考原文: How to Copy asm files between remote ASM instances usi ...
- 【翻译自mos文章】oracle db 中的用户账户被锁--查看oracle用户的尝试次数
參考原文: Users Accounts Getting Locked. (Doc ID 791037.1) 事实上这个文章是为oracle 别的软件产品写的,只是涉及到user 锁定问题.那还是跟d ...
- 【翻译自mos文章】注意: ASMB process exiting due to lack of ASM file activity
注意: ASMB process exiting due to lack of ASM file activity 參考原文: NOTE: ASMB process exiting due to la ...
- 【翻译自mos文章】oracle支持在RDBMS HOME 下的 符号链接( Symbolic Links)吗?
oracle支持在RDBMS HOME 下的 符号链接( Symbolic Links)吗? 參考原文: Does Oracle support Symbolic Links in the RDBMS ...
随机推荐
- 【问题解决方案】Mathtype中丢失Mplugin.dll的问题
网络上搜索到的答案: Mathtype中丢失Mplugin.dll,把Mplugin.dll文件放到Mathtype安装根目录下就好了. 然而试过以后仍然不行 事实是: 如果下载的mathtype安装 ...
- 全文检索引擎sphinx 与 Elasticsearch 索引速度对比
sphinx的特色之一是建立索引速度快,最近转投Elasticsearch后,一直想做个对比,网上资料常见说法是10倍的差距. 测试环境 硬件:单核,2G内存的E5-2630 虚拟机 操作系统:Cen ...
- 一网打尽 @ExceptionHandler、HandlerExceptionResolver、@controlleradvice 三兄弟!
把 @ExceptionHandler.HandlerExceptionResolver.@controlleradvice 三兄弟放在一起来写更有比较性.这三个东西都是用来处理异常的,但是它们使用的 ...
- Kotlin——关于字符串(String)常用操作汇总
在前面讲解Kotlin数据类型的时候,提到了字符串类型,当然关于其定义在前面的章节中已经讲解过了.对Kotlin中的数据类型不清楚的同学.请参考Kotlin——初级篇(三):数据类型详解这篇文章. 在 ...
- quickbi报错AE0510000002
数据库连接异常: com.alipay.dwsap.common.exception.AlisisRuntimeException: 7 AE0510000002:Database access er ...
- linux time命令的输出中“real”“user”“sys”的真正含义
下面转载的文章详细地介绍了time出来显示的“real”“user”“sys”的真正含义. Linux中time命令,我们经常用来计算某个程序的运行耗时,用户态cpu耗时,系统态cpu耗时. 例如: ...
- HashMap、HashTable、ConcurrentHashMap区别
HashMap与HashTable区别 HashMap与ConcurrentHashMap区别 1.HashMap与HashTable的区别 HashMap线程不安全,HashTable线程安全 Ha ...
- YOLOv1到YOLOv3的演变过程及每个算法详解
1,YOLOv1算法的简介 YOLO算法使用深度神经网络进行对象的位置检测以及分类,主要的特点是速度够快,而且准确率也很高,采用直接预测目标对象的边界框的方法,将候选区和对象识别这两个阶段合二为一, ...
- 通俗理解BiLSTM-CRF命名实体识别模型中的CRF层
虽然网上的文章对BiLSTM-CRF模型介绍的文章有很多,但是一般对CRF层的解读比较少. 于是决定,写一系列专门用来解读BiLSTM-CRF模型中的CRF层的文章. 我是用英文写的,发表在了gith ...
- tensorflow函数介绍(1)
tensorflow中的tensor表示一种数据结构,而flow则表现为一种计算模型,两者合起来就是通过计算图的形式来进行计算表述,其每个计算都是计算图上的一个节点,节点间的边表示了计算之间的依赖关系 ...