14:16:23 SYS@ boston> alter user test identified by oracle; alter user test identified by oracle * ERROR at line 1: ORA-28003: password verification for the specified password failed ORA-20001: Password length less than 8
3、查看修改后的概要文件下的参数
1 2 3 4 5 6 7 8 9 10
SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%';
15:04:58 SYS@ boston> alter user test identified by Testdb123 User altered. Elapsed: 00:00:00.11 15:06:04 SYS@ boston> alter user test identified by Testdb123; User altered.
15:13:17 SYS@ boston> ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_TIME 1; Profile altered. Elapsed: 00:00:00.08 15:13:18 SYS@ boston> SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%';
PROFILE RESOURCE_NAME RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 DEFAULT PASSWORD_REUSE_TIME PASSWORD 1 DEFAULT PASSWORD_REUSE_MAX PASSWORD UNLIMITED DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G DEFAULT PASSWORD_LOCK_TIME PASSWORD 1 DEFAULT PASSWORD_GRACE_TIME PASSWORD 7 再次修改用户已经提示 15:13:22 SYS@ boston> alter user test identified by Testdb123; alter user test identified by Testdb123 * ERROR at line 1: ORA-28007: the password cannot be reused Elapsed: 00:00:00.02
15:21:45 SYS@ boston> ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_TIME 1; Profile altered. Elapsed: 00:00:00.05 15:21:46 SYS@ boston> SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%';
PROFILE RESOURCE_NAME RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 DEFAULT PASSWORD_REUSE_TIME PASSWORD 1 DEFAULT PASSWORD_REUSE_MAX PASSWORD 5 DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G DEFAULT PASSWORD_LOCK_TIME PASSWORD 1 DEFAULT PASSWORD_GRACE_TIME PASSWORD 7 设置一天之后,并且修改5次不同密码之后才能复用之前的密码,下面为了满足要求,修改系统时间: 15:23:00 SYS@ boston> select sysdate from dual; SYSDATE ------------------- 2019:01:23 15:23:04 [oracle@dax-mysql-slave admin]$ date -s 20190125 date: 无法设置日期: 不允许的操作 2019年 01月 25日 星期五 00:00:00 CST [oracle@dax-mysql-slave admin]$ exit 登出 [root@dax-mysql-slave ~]# date -s 20190125 2019年 01月 25日 星期五 00:00:00 CST [root@dax-mysql-slave ~]# su - oracle 上一次登录:三 1月 23 13:44:53 CST 2019pts/2 上 [oracle@dax-mysql-slave ~]$ date 2019年 01月 25日 星期五 00:00:06 CST [oracle@dax-mysql-slave ~]$ sql 00:00:26 SYS@ boston> select sysdate from dual; SYSDATE ------------------- 2019:01:25 00:00:34 Elapsed: 00:00:00.00 00:00:34 SYS@ boston> SELECT * FROM dba_profiles s WHERE s.profile='DEFAULT' AND resource_name like 'PASSWORD%'; PROFILE RESOURCE_NAME RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT PASSWORD_LIFE_TIME PASSWORD 180 DEFAULT PASSWORD_REUSE_TIME PASSWORD 1 DEFAULT PASSWORD_REUSE_MAX PASSWORD 5 DEFAULT PASSWORD_VERIFY_FUNCTION PASSWORD VERIFY_FUNCTION_11G DEFAULT PASSWORD_LOCK_TIME PASSWORD 1 DEFAULT PASSWORD_GRACE_TIME PASSWORD 7 6 rows selected. Elapsed: 00:00:00.03 修改5次不同的密码: 00:04:17 SYS@ boston> alter user test identified by Testdb128; User altered. Elapsed: 00:00:00.08 00:04:29 SYS@ boston> alter user test identified by Testdb129; User altered. Elapsed: 00:00:00.03 00:04:33 SYS@ boston> alter user test identified by Testdb130; User altered. Elapsed: 00:00:00.04 00:04:37 SYS@ boston> alter user test identified by Testdb131; User altered. Elapsed: 00:00:00.04 00:04:39 SYS@ boston> alter user test identified by Testdb132; User altered. 修改5次之后再次修改为以前的密码,修改正常: Elapsed: 00:00:00.04 00:04:40 SYS@ boston> alter user test identified by Testdb123; User altered. 再次修改为上面修改的新的密码,提示不能复用: Elapsed: 00:00:00.05 00:04:46 SYS@ boston> alter user test identified by Testdb130; alter user test identified by Testdb130 * ERROR at line 1: ORA-28007: the password cannot be reused Elapsed: 00:00:00.02 00:04:56 SYS@ boston>