Example 13-3 SUDO Example 2: Allow a User to Perform Only Selected
ODACLI Operations
To configure SUDO to allow a user to perform only selected ODACLI operations, add
lines to the commands section in the
/etc/sudoers
file as follows:
## DCS commands for oracle user
Cmnd_Alias DCSCMDS = /opt/oracle/dcs/bin/odacli describe-appliance
oracle ALL= DCSCMDS
$ sudo /opt/oracle/dcs/bin/odacli describe-appliance
Appliance Information
----------------------------------------------------------------
ID: a977bb04-6cf0-4c07-8e0c-91a8c7e7ebb8
Platform: OdaliteL
Data Disk Count: 6
CPU Core Count: 20
Created: October 24, 2017 6:51:52 AM HDT
System Information
----------------------------------------------------------------
Name: rwsodal001
Domain Name: example.com
Time Zone: America/Adak
DB Edition: EE
DNS Servers: 10.200.76.198 10.200.76.199 192.0.2.254
NTP Servers: 10.200.0.1 10.200.0.2
Disk Group Information
----------------------------------------------------------------
DG Name Redundancy Percentage
------------------------- ------------------------- ------------
Data Normal 90
Reco Normal 10
In this example, the user
jdoe2
tries to run the
sudo odacli list-databases
command, which is not part of the set of commands that is configured for that user.
SUDO prevents
jdoe2
from running the command.
[jdoe2@servernode1 ~]$ sudo /opt/oracle/dcs/bin/odacli list-databases
Sorry, user jdoe2 is not allowed to execute '/opt/oracle/dcs/bin/odacli
list-databases' as root on servernode1.
Configure Command
Use the
configure
and
update
commands to configure the appliance.
•
Use the command
configure-firstnet
to configure the first network in the
appliance after racking and connecting the power and network cables.
Chapter 13
Configure Command
13-7
Summary of Contents for Database Appliance X6-2-HA
Page 15: ...Index xv...