Thursday, December 22, 2011

Enable and Disable user password complexity of an Oracle Database


[oracle@localhost ~]$ ORACLE_SID=orcl
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Dec 23 11:51:30 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> create user rakeshor identified by rakeshor;

User created.



SQL> @/u01/oracle/product/10.2.0/db_1/rdbms/admin/utlpwdmg.sql;

Function created.


Profile altered.

SQL> select object_name from dba_objects where object_type='FUNCTION' and object_name like 'VERIFY%';

OBJECT_NAME
--------------------------------------------------------------------------------
VERIFY_FUNCTION

SQL> select username,profile from dba_users where username='RAKESHOR';

USERNAME                       PROFILE
------------------------------ ------------------------------
RAKESHOR                       DEFAULT

SQL> alter profile default limit password_verify_function verify_function;    

Profile altered.

SQL> password rakeshor
Changing password for rakeshor
New password:                                                   (password=pass)
Retype new password:
ERROR:
ORA-28003: password verification for the specified password failed
ORA-20003: Password should contain at least one digit, one character and one
punctuation


Password unchanged

/////Disable Verify_function//////////

SQL> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_VERIFY_FUNCTION NULL;

Profile altered.

SQL> password rakeshor
Changing password for rakeshor
New password:                                                                  (password=pass)
Retype new password:
Password changed
SQL>

6 comments:

  1. thanks, this help with my problem :-)

    ReplyDelete
  2. Thanks it helped me to solve my problem

    ReplyDelete
  3. Thanks but please don't write it on green background with red fonts. It's very hard to read.

    ReplyDelete
  4. OH MY GOD MY EYES! Found the command I needed though.

    ReplyDelete
  5. May be article is worth reading but colour scheme is like rubbish

    ReplyDelete
  6. Thanks for the info. Did you intentionally try and find the worst color scheme on the planet? Thanks again though.

    ReplyDelete