Unlock expired password.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 09 Apr 2018 23:22:54 +0300
changeset 2245 30d831980005
parent 2244 7d8a914e06ee
child 2246 dfb949a71021
Unlock expired password.
oracle.rst
--- a/oracle.rst	Thu Apr 05 19:30:23 2018 +0300
+++ b/oracle.rst	Mon Apr 09 23:22:54 2018 +0300
@@ -529,3 +529,32 @@
 
 https://dba.stackexchange.com/questions/173540/generate-insert-statements-for-each-entry-in-a-table
   Generate ``insert`` statements for each entry in a table.
+
+Unlock expired password
+=======================
+
+Connect as sysdba to the database and reset password and unlock user::
+
+  alter user <USER> identified by <PASSWORD>;
+  alter user <USER> account unlock;
+
+  alter user <LUSER> identified by <PASSWORD> account unlock;
+
+To make password lasts infinitely check which profile is used assigned::
+
+  select USERNAME, PROFILE from DBA_USERS;
+
+and check settings for this prifile::
+
+  select * from DBA_PROFILES where PROFILE = 'SA';
+
+and reset limits for password lifetime::
+
+  alter profile DEFAULT limit PASSWORD_LIFE_TIME UNLIMITED;
+
+You may create separate profile with its own settings::
+
+  create profile MY;
+  alter profile MY PASSWORD_LIFE_TIME UNLIMITED;
+  alter user <USER> profile MY;
+