웹개발 관련

[ORACLE] 비밀번호 만료일 변경

반응형

디비 비번 만료일을 무한으로 안해놓으면

 

기본적으로 세팅이 되어있는 주기에 맞춰서 비밀번호를 계속 바꿔줘야함.

 

미리 안바꿔놓으면 비밀번호가 만료되어서 에러발생

 

그래서 난 무한으로 설정해놓음.

 

 

 

 

 

 

[root@server ~]# su - oracle

[oracle@server ~]$ sqlplus /nolog

 

SQL> connect id/pw

Connected.

 

 

 

------확인

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

 

RESOURCE_NAME                    LIMIT

-------------------------------- ----------------------------------------

PASSWORD_REUSE_TIME              UNLIMITED

PASSWORD_REUSE_MAX               UNLIMITED

PASSWORD_VERIFY_FUNCTION         NULL

PASSWORD_LOCK_TIME               1

PASSWORD_GRACE_TIME              7

 

16 rows selected.

 

 

----------만료일 확인

SQL> SELECT USERNAME, ACCOUNT_STATUS, LOCK_DATE, EXPIRY_DATE FROM DBA_USERS WHERE USERNAME='TEST';        

 

USERNAME                       ACCOUNT_STATUS                   LOCK_DATE

------------------------------ -------------------------------- ---------

EXPIRY_DA

---------

TEST                         OPEN

04-MAR-17

 

 

 

 

 

------- 만료일 제거

SQL> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

 

 

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               UNLIMITED

 

RESOURCE_NAME                    LIMIT

-------------------------------- ----------------------------------------

PASSWORD_REUSE_TIME              UNLIMITED

PASSWORD_REUSE_MAX               UNLIMITED

PASSWORD_VERIFY_FUNCTION         NULL

PASSWORD_LOCK_TIME               1

PASSWORD_GRACE_TIME              7

 

 

 

----------만료일 확인

SQL> SELECT USERNAME, ACCOUNT_STATUS, LOCK_DATE, EXPIRY_DATE FROM DBA_USERS WHERE USERNAME='TEST';        

 

USERNAME                       ACCOUNT_STATUS                   LOCK_DATE

------------------------------ -------------------------------- ---------

EXPIRY_DA

---------

TEST                       OPEN

 

 

반응형