Oracle X6-2-HA Deployment And User's Manual page 215

Database appliance
Hide thumbs Also See for X6-2-HA:
Table of Contents

Advertisement

Example 13-2
SUDO Example 1: Allow a User to Perform Any ODACLI
Operation
This example shows how to configure SUDO to enable a user to perform any ODACLI
operation. You do this by adding lines to the commands section in the /etc/sudoers
file:
## The commands section may have other options added to it.
##
Cmnd_Alias ODACLI_CMDS=/opt/oracle/dcs/bin/odacli *
jdoe ALL = ODACLI_CMDS
In this example, the user name is jdoe. The file parameter setting ALL= ODACLI_CMDS
grants the user jdoe permission to run all odacli commands that are defined by the
command alias ODACLI_CMDS. After configuration, you can copy one sudoers file to
multiple hosts. You can also create different rules on each host.
Note:
Before database creation, you must set up user equivalency with SSH for the
root user on each server. If you do not set up user equivalency and configure
SSH on each server, then you are prompted to provide the root password for
each server during database creation.
After you configure the sudoer file with the user, the user jdoe can run the set of
odacli commands configured with the command alias ODACLI_CMDS. For example:
odacli create-database --dbname newdb -m
Password for SYS,SYSTEM and PDB Admin:
Job details
----------------------------------------------------------------
ID: 1bc31577-f910-4d3f-b6ff-8e3fccd30141
Description: Database service creation with db name: newdb
Status: Created
Created: November 30, 2018 9:23:57 AM PST
Message:
Task Name Start Time End Time Status
-----------------------------------------------------------
Managing ODACLI Privileges and Security with SUDO
Chapter 13
13-6

Advertisement

Table of Contents
loading

Table of Contents