Configuring Operating System Users for a PDB
The DBMS_CREDENTIAL.CREATE_CREDENTIAL procedure configures user accounts to be operating system users for a PDB.
-
About Configuring Operating System Users for a PDB
Instead theoracleoperating system user, you can set a specific user account to be the operating system user for that PDB. -
Configuring an Operating System User for a PDB
TheDBMS_CREDENTIAL.CREATE_CREDENTIALprocedure can set an operating system user for a PDB.
About Configuring Operating System Users for a PDB
Instead the oracle operating system user, you can set a specific user account to be the operating system user for that PDB.
If you do not set a specific user to be the operating system user for the PDB, then by default the PDB uses the oracle operating system user. For the root, you can use the oracle operating system user when you must interact with the operating system.
For better security, Oracle recommends that you set a unique operating system user for each PDB in a multitenant environment. Doing so helps to ensure that operating system interactions are performed as a less powerful user than the oracle operating system user, and helps to protect data that belongs to one PDB from being accessed by users who are connected to other PDBs.
Configuring an Operating System User for a PDB
The DBMS_CREDENTIAL.CREATE_CREDENTIAL procedure can set an operating system user for a PDB.
-
Log in to the database instance root as a user who has the
EXECUTEprivilege for theDBMS_CREDENTIALPL/SQL package and theALTER SYSTEMsystem privilege.For example:
sqlplus c##sec_admin Enter password: password -
Run the
DBMS_CREDENTIAL.CREATE_CREDENTIALprocedure to create an Oracle credential for the operating system user.For example, to set the credential for a user named
os_admin:BEGIN DBMS_CREDENTIAL.CREATE_CREDENTIAL ( credential_name => 'PDB1_OS_USER', username => 'os_admin', password => 'password'); END; / -
Connect to the PDB for which the operating system user will be used.
For example:
CONNECT cc##sec_admin@hrpdb Enter password: passwordTo find the available PDBs, run the
show pdbscommand. To check the current PDB, run the showcon_namecommand. -
Set the
PDB_OS_CREDENTIALinitialization parameter for the user whose credential was set in Step 2.For example:
ALTER SYSTEM SET PDB_OS_CREDENTIAL = PDB1_OS_USER SCOPE = SPFILE;The
PDB_OS_CREDENTIALparameter is a static parameter, so you must set it using theSCOPE = SPFILEclause. -
Restart the database instance.
SHUTDOWN IMMEDIATE STARTUP