【翻译自mos文章】oracle密码管理策略(二)

2014-11-24 14:22:55 · 作者: · 浏览: 1
mple 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;