Example of Creating Role-allocated Groups, Users, and Paths
Understand this example of how to create role-allocated groups and users that is compliant with an Optimal Flexible Architecture (OFA) deployment.
This example illustrates the following scenario:
-
An Oracle Grid Infrastructure installation
-
Two separate Oracle Database installations planned for the cluster,
DB1
andDB2
-
Separate installation owners for Oracle Grid Infrastructure, and for each Oracle Database
-
Full role allocation of system privileges for Oracle ASM, and for each Oracle Database
-
Oracle Database owner
oracle1
granted the right to start up and shut down the Oracle ASM instance
Create groups and users for a role-allocated configuration for this scenario using the following commands:
# groupadd -g 54321 oinstall
# groupadd -g 54322 dba1
# groupadd -g 54332 dba2
# groupadd -g 54323 oper1
# groupadd -g 54333 oper2
# groupadd -g 54324 backupdba1
# groupadd -g 54334 backupdba2
# groupadd -g 54325 dgdba1
# groupadd -g 54335 dgdba2
# groupadd -g 54326 kmdba1
# groupadd -g 54336 kmdba2
# groupadd -g 54327 asmdba
# groupadd -g 54328 asmoper
# groupadd -g 54329 asmadmin
# groupadd -g 54330 racdba1
# groupadd -g 54340 racdba2
# useradd -u 54322 -g oinstall -G asmadmin,asmdba,racdba1,racdba2 grid
# useradd -u 54321 -g oinstall -G dba1,backupdba1,dgdba1,kmdba1,asmdba,racdba1,asmoper oracle1
# useradd -u 54323 -g oinstall -G dba2,backupdba2,dgdba2,kmdba2,asmdba,racdba2 oracle2
# mkdir -p /u01/app/19.0.0/grid
# mkdir -p /u01/app/grid
# mkdir -p /u01/app/oracle1
# mkdir -p u01/app/oracle2
# chown -R grid:oinstall /u01
# chmod -R 775 /u01/
# chown oracle1:oinstall /u01/app/oracle1
# chown oracle2:oinstall /u01/app/oracle2
After running these commands, you have a set of administrative privileges groups and users for Oracle Grid Infrastructure, and for two separate Oracle databases (DB1
and DB2
):
Example 6-1 Oracle Grid Infrastructure Groups and Users Example
The command creates the following Oracle Grid Infrastructure groups and users:
-
An Oracle central inventory group, or
oraInventory
group (oinstall
), whose members that have this group as their primary group. Members of this group are granted the OINSTALL system privileges, which grants permissions to write to theoraInventory
directory, and other associated install binary privileges. -
An OSASM group (
asmadmin
), associated with Oracle Grid Infrastructure during installation, whose members are granted the SYSASM privileges to administer Oracle ASM. -
An OSDBA for ASM group (
asmdba
), associated with Oracle Grid Infrastructure storage during installation. Its members include grid and any database installation owners, such asoracle1
andoracle2
, who are granted access to Oracle ASM. Any additional installation owners that use Oracle ASM for storage must also be made members of this group. -
An OSOPER for ASM group for Oracle ASM (
asmoper
), associated with Oracle Grid Infrastructure during installation. Members ofasmoper
group are granted limited Oracle ASM administrator privileges, including the permissions to start and stop the Oracle ASM instance. -
An Oracle Grid Infrastructure installation owner (
grid
), with the oraInventory group (oinstall
) as its primary group, and with the OSASM (asmadmin
) group and the OSDBA for ASM (asmdba
) group as secondary groups. -
/u01/app/oraInventory
. The central inventory of Oracle installations on the cluster. This path remains owned bygrid:oinstall
, to enable other Oracle software owners to write to the central inventory. -
An OFA-compliant mount point
/u01
owned bygrid:oinstall
before installation, so that Oracle Universal Installer can write to that path. -
An Oracle base for the grid installation owner
/u01/app/grid
owned bygrid:oinstall
with 775 permissions, and changed during the installation process to 755 permissions. -
A Grid home
/u01/app/19.0.0/grid
owned bygrid:oinstall
with 775 (drwxdrwxr-x) permissions. These permissions are required for installation, and are changed during the installation process toroot:oinstall
with 755 permissions (drwxr-xr-x
).
Example 6-2 Oracle Database DB1 Groups and Users Example
The command creates the following Oracle Database (DB1
) groups and users:
-
An Oracle Database software owner (
oracle1
), which owns the Oracle Database binaries forDB1
. Theoracle1
user has the oraInventory group as its primary group, and the OSDBA group for its database (dba1
) and the OSDBA for ASM group for Oracle Grid Infrastructure (asmdba
) as secondary groups. In addition, theoracle1
user is a member ofasmoper
, granting that user privileges to start up and shut down Oracle ASM. -
An OSDBA group (
dba1
). During installation, you identify the groupdba1
as the OSDBA group for the database installed by the useroracle1
. Members ofdba1
are granted the SYSDBA privileges for the Oracle DatabaseDB1
. Users who connect as SYSDBA are identified as user SYS onDB1
. -
An OSBACKUPDBA group (
backupdba1
). During installation, you identify the groupbackupdba1
as the OSDBA group for the database installed by the useroracle1
. Members ofbackupdba1
are granted the SYSBACKUP privileges for the database installed by the useroracle1
to back up the database. -
An OSDGDBA group (
dgdba1
). During installation, you identify the groupdgdba1
as the OSDGDBA group for the database installed by the useroracle1
. Members ofdgdba1
are granted the SYSDG privileges to administer Oracle Data Guard for the database installed by the useroracle1
. -
An OSKMDBA group (
kmdba1
). During installation, you identify the groupkmdba1
as the OSKMDBA group for the database installed by the useroracle1
. Members ofkmdba1
are granted the SYSKM privileges to administer encryption keys for the database installed by the useroracle1
. -
An OSOPER group (
oper1
). During installation, you identify the groupoper1
as the OSOPER group for the database installed by the useroracle1
. Members ofoper1
are granted the SYSOPER privileges (a limited set of the SYSDBA privileges), including the right to start up and shut down theDB1
database. Users who connect as OSOPER privileges are identified as user PUBLIC onDB1
. -
An Oracle base
/u01/app/oracle1
owned byoracle1:oinstall
with 775 permissions. The useroracle1
has permissions to install software in this directory, but in no other directory in the/u01/app
path.
Example 6-3 Oracle Database DB2 Groups and Users Example
The command creates the following Oracle Database (DB2) groups and users:
-
An Oracle Database software owner (
oracle2
), which owns the Oracle Database binaries for DB2. Theoracle2
user has the oraInventory group as its primary group, and the OSDBA group for its database (dba2
) and the OSDBA for ASM group for Oracle Grid Infrastructure (asmdba
) as secondary groups. However, theoracle2
user is not a member of theasmoper
group, sooracle2
cannot shut down or start up Oracle ASM. -
An OSDBA group (
dba2
). During installation, you identify the groupdba2
as the OSDBA group for the database installed by the useroracle2
. Members ofdba2
are granted the SYSDBA privileges for the Oracle Database DB2. Users who connect as SYSDBA are identified as user SYS on DB2. -
An OSBACKUPDBA group (
backupdba2
). During installation, you identify the groupbackupdba2
as the OSDBA group for the database installed by the useroracle2
. Members ofbackupdba2
are granted the SYSBACKUP privileges for the database installed by the useroracle2
to back up the database. -
An OSDGDBA group (
dgdba2
). During installation, you identify the groupdgdba2
as the OSDGDBA group for the database installed by the useroracle2
. Members ofdgdba2
are granted the SYSDG privileges to administer Oracle Data Guard for the database installed by the useroracle2
. -
An OSKMDBA group (
kmdba2
). During installation, you identify the groupkmdba2
as the OSKMDBA group for the database installed by the useroracle2
. Members ofkmdba2
are granted the SYSKM privileges to administer encryption keys for the database installed by the useroracle2
. -
An OSOPER group (
oper2
). During installation, you identify the groupoper2
as the OSOPER group for the database installed by the useroracle2
. Members ofoper2
are granted the SYSOPER privileges (a limited set of the SYSDBA privileges), including the right to start up and shut down the DB2 database. Users who connect as OSOPER privileges are identified as user PUBLIC on DB2. -
An Oracle base
/u01/app/oracle2
owned byoracle1:oinstall
with 775 permissions. The useroracle2
has permissions to install software in this directory, but in no other directory in the/u01/app
path.