Linux User Accounts

Not Oracle Cloud InfrastructureNot Oracle Cloud at Customer This topic does not apply to Oracle Cloud Infrastructure or to Oracle Cloud at Customer.

This section provides information about Linux user accounts that are provisioned on an Oracle Database Cloud Service deployment that hosts an Oracle Real Application Clusters (Oracle RAC) database.

Both compute nodes are provisioned with the following operating system user accounts.

User Description

opc

The system administrator account you use to connect to the compute node using SSH. This user can use the sudo command to perform operations that require root-user access.

oracle

The Oracle Database administrator account you use to access the system and perform non-root database administration tasks. A home directory, /home/oracle, is created for this user. This user cannot use the sudo command to perform operations that require root-user access. Additionally, by default you cannot connect as this user to the compute node using SSH. You can add the public key to the user’s $HOME/.ssh/authorized_keys file to grant persistent SSH access, or you can connect as the opc user and then use the sudo -s command to start a root-user command shell, followed by an su - oracle command to switch to the oracle user.

grid

The Oracle Grid Infrastructure administrator account you use to perform ASM, ACFS, and clusterware administration tasks. A home directory, /home/grid, is created for this user. This user cannot use the sudo command to perform operations that require root-user access. Additionally, by default you cannot connect as this user to the compute node using SSH. You can add the public key to the user’s $HOME/.ssh/authorized_keys file to grant persistent SSH access, or you can connect as the opc user and then use the sudo -s command to start a root-user command shell, followed by an su - grid command to switch to the grid user.

root

The root administrator for the system. You do not have direct access to this account. To perform operations that require root-user access, use the sudo command as the opc user.

The following environment variable settings are created for the opc, oracle and grid users.

Variable Description

HOME

The home directory of the user, either /home/opc, /home/oracle or /home/grid.

HOSTNAME

The host name of the compute node:

  • deployment-name1 for the first compute node

  • deployment-name2 for the second compute node

LANG

The system language, en_US.UTF-8.

SHELL

The default shell, /bin/bash.

USER

The user name, either opc, oracle or grid.

In addition, the PATH variable is also created for all three users, but its value differs (line breaks added to improve clarity):

  • For the opc user:

    /opt/oracle/dcs/client/bin:/usr/java/jdk1.7.0_72/bin:
    /usr/lib64/qt-3.3/bin:
    /usr/local/bin:/bin:/usr/bin:
    /usr/local/sbin:/usr/sbin:/sbin:
    /home/opc/bin
  • For the oracle user:

    /usr/lib64/qt-3.3/bin:
    /usr/local/bin:/bin:/usr/bin:
    /usr/local/sbin:/usr/sbin:/sbin:
    /u01/app/oracle/product/db-version/dbhome_1/bin:
    /home/oracle/bin

    where db-version is 18.0.0, 12.2.0.1, 12.1.0.2 or 11.2.0.2, depending on which version of Oracle Database was installed.

  • For the grid user:

    /usr/lib64/qt-3.3/bin:
    /usr/local/bin:/bin:/usr/bin:
    /usr/local/sbin:/usr/sbin:/sbin:
    /u01/app/12.1.0.2/grid/bin:
    /home/grid/bin

In addition, the following environment variable settings are created for the oracle user.

Variable Description

LD_LIBRARY_PATH

The Oracle Database library directory:

  • For Oracle Database 18c, /u01/app/oracle/product/18.0.0/dbhome_1/lib

  • For Oracle Database 12c Release 2, /u01/app/oracle/product/12.2.0.1/dbhome_1/lib

  • For Oracle Database 12c Release 1, /u01/app/oracle/product/12.1.0.2/dbhome_1/lib

  • For Oracle Database 11g Release 2, /u01/app/oracle/product/11.2.0.2/dbhome_1/lib

ORACLE_HOME

The Oracle Database home directory:

  • For Oracle Database 18c, /u01/app/oracle/product/18.0.0/dbhome_1

  • For Oracle Database 12c Release 2, /u01/app/oracle/product/12.2.0.1/dbhome_1

  • For Oracle Database 12c Release 1, /u01/app/oracle/product/12.1.0.2/dbhome_1

  • For Oracle Database 11g Release 2, /u01/app/oracle/product/11.2.0.2/dbhome_1

ORACLE_SID

The database system identifier (SID) for the database instance on the compute node:

  • db-sid1 for the first compute node

  • db-sid2 for the second compute node

where db-sid is the database system identifer (SID) provided as the DB Name (SID) value during the database deployment creation process.

ORACLE_UNQNAME

The database system identifer (SID) provided as the DB Name (SID) value during the database deployment creation process.

In addition, the following environment variable settings are created for the grid user.

Variable Description

LD_LIBRARY_PATH

Set to /u01/app/12.1.0.2/grid/lib.

ORACLE_HOME

The Oracle Grid Infrastructure home directory: /u01/app/12.1.0.2/grid.