Creating a password profile

You can use a profile to implement your password policy.

Getting ready

To complete this recipe, you'll need an existing user who has create profile privilege (such as an OS-authenticated user who has database administrators (dba) role, for example, ops$zoran). Also, you'll need an unlocked user account named scott.

Make sure that the resource_limit parameter is set to true.

How to do it...

  1. Connect to the database as a user who has create profile privilege:
           sqlplus /
    
    
  2. Create a password profile:
           create profile userprofile limit
           failed_login_attempts 4
           password_lock_time 2
           password_life_time 180;
    
  3. Alter the user to use a newly created password profile:
           alter user scott profile userprofile;
    
    
  4. Alter the default ...

Get Oracle Database 12c Security Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.