Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.01 KB | None | 0 0
  1. ACCOUNT_STATUS VARCHAR2(32) NOT NULL Account status:
  2.  
  3. OPEN
  4.  
  5.  
  6.  
  7. EXPIRED
  8.  
  9. EXPIRED(GRACE)
  10.  
  11. LOCKED(TIMED)
  12.  
  13. LOCKED
  14.  
  15. EXPIRED & LOCKED(TIMED)
  16.  
  17. EXPIRED(GRACE) & LOCKED(TIMED)
  18.  
  19. EXPIRED & LOCKED
  20.  
  21. EXPIRED(GRACE) & LOCKED
  22.  
  23.  
  24. 1.
  25. SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  26.  
  27. ACCOUNT_STATUS
  28. --------------------------------
  29. OPEN
  30.  
  31. 2.
  32.  
  33. SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  34.  
  35. ACCOUNT_STATUS
  36. --------------------------------
  37. LOCKED
  38.  
  39. 3.
  40. SQL> alter profile default LIMIT failed_login_attempts 1;
  41.  
  42. Profile altered.
  43.  
  44. SQL> conn taj/wrongpassword
  45. ERROR:
  46. ORA-01017: invalid username/password; logon denied
  47.  
  48.  
  49. Warning: You are no longer connected to ORACLE.
  50. SQL> conn taj/taj
  51. ERROR:
  52. ORA-28000: the account is locked
  53.  
  54. SQL> conn sys as sysdba
  55. Enter password:
  56. Connected.
  57. SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  58.  
  59. ACCOUNT_STATUS
  60. --------------------------------
  61. LOCKED(TIMED)
  62.  
  63. 4.
  64. SQL> alter user taj password expire;
  65.  
  66. User altered.
  67.  
  68. SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  69.  
  70. ACCOUNT_STATUS
  71. --------------------------------
  72. EXPIRED
  73.  
  74.  
  75. 5.
  76. SQL> alter user taj password expire account lock;
  77.  
  78. User altered.
  79.  
  80. SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  81.  
  82. ACCOUNT_STATUS
  83. --------------------------------
  84. EXPIRED & LOCKED
  85.  
  86.  
  87. 6.
  88. 09:53:38 SQL> alter profile default limit password_lock_time 1/1440;
  89.  
  90. Profile altered.
  91.  
  92. 09:53:47 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  93.  
  94. ACCOUNT_STATUS
  95. --------------------------------
  96. OPEN
  97.  
  98. 09:53:59 SQL> alter profile default limit password_grace_time 2/1440;
  99.  
  100. Profile altered.
  101.  
  102. 09:54:14 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  103.  
  104. ACCOUNT_STATUS
  105. --------------------------------
  106. OPEN
  107.  
  108.  
  109. 09:55:03 SQL> conn taj/taj
  110. ERROR:
  111. ORA-28002: the password will expire within 0 days
  112.  
  113.  
  114. Connected.
  115.  
  116. 09:55:08 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  117.  
  118. ACCOUNT_STATUS
  119. --------------------------------
  120. EXPIRED(GRACE)
  121.  
  122. 7.
  123. 10:10:48 SQL> alter profile default limit failed_login_attempt 1;
  124. alter profile default limit failed_login_attempt 1
  125. *
  126. ERROR at line 1:
  127. ORA-02376: invalid or redundant resource
  128.  
  129.  
  130. 10:11:10 SQL> alter profile default limit failed_login_attempts 1;
  131.  
  132. Profile altered.
  133.  
  134. 10:11:28 SQL> alter user TAJ password expire;
  135.  
  136. User altered.
  137.  
  138. 10:12:25 SQL> conn taj/wrongpassword
  139. ERROR:
  140. ORA-01017: invalid username/password; logon denied
  141.  
  142.  
  143. Warning: You are no longer connected to ORACLE.
  144. 10:12:31 SQL> conn sys as sysdba
  145. Enter password:
  146. Connected.
  147. 10:12:37 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  148.  
  149. ACCOUNT_STATUS
  150. --------------------------------
  151. EXPIRED & LOCKED(TIMED)
  152.  
  153. 10:12:40 SQL>
  154.  
  155. 8.
  156.  
  157. 10:14:04 SQL> alter profile default limit password_lock_time 30/86400;
  158.  
  159. Profile altered.
  160.  
  161. 10:14:20 SQL> alter profile default limit password_grace_time 1/1440;
  162.  
  163. Profile altered.
  164.  
  165. 10:14:38 SQL> alter profile default limit failed_login_attempts 1;
  166.  
  167. Profile altered.
  168.  
  169. 10:14:45 SQL> conn taj/taj
  170. ERROR:
  171. ORA-28002: the password will expire within 0 days
  172.  
  173.  
  174. Connected.
  175. 10:15:16 SQL> conn sys as sysdba
  176. Enter password:
  177. Connected.
  178. 10:15:28 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  179.  
  180. ACCOUNT_STATUS
  181. --------------------------------
  182. EXPIRED(GRACE)
  183.  
  184. 10:15:32 SQL> conn taj/wrongpassword
  185. ERROR:
  186. ORA-01017: invalid username/password; logon denied
  187.  
  188.  
  189. Warning: You are no longer connected to ORACLE.
  190. 10:15:41 SQL> conn sys as sysdba
  191. Enter password:
  192. Connected.
  193. 10:15:45 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  194.  
  195. ACCOUNT_STATUS
  196. --------------------------------
  197. EXPIRED(GRACE) & LOCKED(TIMED)
  198.  
  199. 9.
  200. 10:16:37 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  201.  
  202. ACCOUNT_STATUS
  203. --------------------------------
  204. EXPIRED(GRACE)
  205.  
  206. 10:16:41 SQL> alter user taj account lock;
  207.  
  208. User altered.
  209.  
  210. 10:16:48 SQL> select ACCOUNT_STATUS from dba_users where username = 'TAJ';
  211.  
  212. ACCOUNT_STATUS
  213. --------------------------------
  214. EXPIRED(GRACE) & LOCKED
  215.  
  216.  
  217. NOte: All Configuration depand on below parameters
  218.  
  219. FAILED_LOGIN_ATTEMPTS
  220. PASSWORD_LOCK_TIME
  221. PASSWORD_GRACE_TIME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement