prifile

 

Stop a users password from expiring.

In 11g, a profile password expires by default at 180 days. This can be a pain, and the means to stop this is to create another profile with unlimited password lifetime, then assign it to the user.


SQL> select profile from dba_users where username = ‘APPADMIN’;

PROFILE
——————————
DEFAULT

SQL> select resource_name, limit from dba_profiles where profile = ‘DEFAULT’;

RESOURCE_NAME LIMIT
——————————– —————————————-
COMPOSITE_LIMIT UNLIMITED
SESSIONS_PER_USER UNLIMITED
CPU_PER_SESSION UNLIMITED
CPU_PER_CALL UNLIMITED
LOGICAL_READS_PER_SESSION UNLIMITED
LOGICAL_READS_PER_CALL UNLIMITED
IDLE_TIME UNLIMITED
CONNECT_TIME UNLIMITED
PRIVATE_SGA UNLIMITED
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME 180
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION NULL
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 7

16 rows selected.

So, the limit on the password is 180 days here, after which it will expire and stop logins on the account.

select txt from (select 0 pos, ‘create profile appprofile limit’ txt from dual
union
select rownum pos, resource_name||’ ‘||limit txt from dba_profiles where profile = ‘DEFAULT’ and limit ‘UNLIMITED’
union
select 999 pos, ‘/’ txt from dual)
order by pos;

TXT
————————————————————————-
create profile appprofile limit
FAILED_LOGIN_ATTEMPTS 10
PASSWORD_LIFE_TIME 180
PASSWORD_VERIFY_FUNCTION NULL
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 7
/

7 rows selected.

Change any limits you require and add others if needed. Then create the profile and assign it to the user.

SQL> create profile appprofile limit
2 FAILED_LOGIN_ATTEMPTS 10
3 PASSWORD_LIFE_TIME UNLIMITED
4 PASSWORD_VERIFY_FUNCTION NULL
5 PASSWORD_LOCK_TIME 1
6 PASSWORD_GRACE_TIME 7
7 /

Profile created.

SQL> alter user appadmin profile appprofile;

User altered.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值