Creating and using OS-authenticated users

In this recipe, you'll learn about OS-authenticated users.

Getting ready

To complete this recipe, you'll need an existing user who has a dba role, for example, johndba. It is assumed that you are working on Linux.

How to do it...

  1. Connect to the database as a user who has a DBA role:
    $ sqlplus johndba
    
    
  2. Find the prefix for operating system authentication:
    SQL> show parameter os_authent_prefix
       
    NAME                  TYPE          VALUE      
    -----------------     --------      -----------
    os_authent_prefix     string        ops$
    
  3. Create an OS-authenticated user:
    SQL> create user ops$zoran identified externally;
    
    
  4. Grant this user the create session privilege:
    SQL> grant create session to ops$zoran;
    
    
  5. Log in to the operating system as the user zoran:
    $ su - zoran
    

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.