Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ACCOUNT_STATUS VARCHAR2(32) NOT NULL Account status:
- OPEN
- EXPIRED
- EXPIRED(GRACE)
- LOCKED(TIMED)
- LOCKED
- EXPIRED & LOCKED(TIMED)
- EXPIRED(GRACE) & LOCKED(TIMED)
- EXPIRED & LOCKED
- EXPIRED(GRACE) & LOCKED
- 1.
- SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- OPEN
- 2.
- SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- LOCKED
- 3.
- SQL> alter profile default LIMIT failed_login_attempts 1;
- Profile altered.
- SQL> conn taj/wrongpassword
- ERROR:
- ORA-01017: invalid username/password; logon denied
- Warning: You are no longer connected to ORACLE.
- SQL> conn taj/taj
- ERROR:
- ORA-28000: the account is locked
- SQL> conn sys as sysdba
- Enter password:
- Connected.
- SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- LOCKED(TIMED)
- 4.
- SQL> alter user taj password expire;
- User altered.
- SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED
- 5.
- SQL> alter user taj password expire account lock;
- User altered.
- SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED & LOCKED
- 6.
- 09:53:38 SQL> alter profile default limit password_lock_time 1/1440;
- Profile altered.
- 09:53:47 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- OPEN
- 09:53:59 SQL> alter profile default limit password_grace_time 2/1440;
- Profile altered.
- 09:54:14 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- OPEN
- 09:55:03 SQL> conn taj/taj
- ERROR:
- ORA-28002: the password will expire within 0 days
- Connected.
- 09:55:08 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED(GRACE)
- 7.
- 10:10:48 SQL> alter profile default limit failed_login_attempt 1;
- alter profile default limit failed_login_attempt 1
- *
- ERROR at line 1:
- ORA-02376: invalid or redundant resource
- 10:11:10 SQL> alter profile default limit failed_login_attempts 1;
- Profile altered.
- 10:11:28 SQL> alter user TAJ password expire;
- User altered.
- 10:12:25 SQL> conn taj/wrongpassword
- ERROR:
- ORA-01017: invalid username/password; logon denied
- Warning: You are no longer connected to ORACLE.
- 10:12:31 SQL> conn sys as sysdba
- Enter password:
- Connected.
- 10:12:37 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED & LOCKED(TIMED)
- 10:12:40 SQL>
- 8.
- 10:14:04 SQL> alter profile default limit password_lock_time 30/86400;
- Profile altered.
- 10:14:20 SQL> alter profile default limit password_grace_time 1/1440;
- Profile altered.
- 10:14:38 SQL> alter profile default limit failed_login_attempts 1;
- Profile altered.
- 10:14:45 SQL> conn taj/taj
- ERROR:
- ORA-28002: the password will expire within 0 days
- Connected.
- 10:15:16 SQL> conn sys as sysdba
- Enter password:
- Connected.
- 10:15:28 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED(GRACE)
- 10:15:32 SQL> conn taj/wrongpassword
- ERROR:
- ORA-01017: invalid username/password; logon denied
- Warning: You are no longer connected to ORACLE.
- 10:15:41 SQL> conn sys as sysdba
- Enter password:
- Connected.
- 10:15:45 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED(GRACE) & LOCKED(TIMED)
- 9.
- 10:16:37 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED(GRACE)
- 10:16:41 SQL> alter user taj account lock;
- User altered.
- 10:16:48 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
- ACCOUNT_STATUS
- --------------------------------
- EXPIRED(GRACE) & LOCKED
- NOte: All Configuration depand on below parameters
- FAILED_LOGIN_ATTEMPTS
- PASSWORD_LOCK_TIME
- PASSWORD_GRACE_TIME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement