You can manage common and local users and roles for a multitenant environment by using Oracle Enterprise Manager.
About Managing Security for a Multitenant Environment in Enterprise Manager
Logging into a Multitenant Environment in Enterprise Manager
Managing Common and Local Roles and Privileges in Enterprise Manager
In a multitenant environment, you can use Oracle Enterprise Manager Cloud Control to create, manage, and monitor common users and roles for both the root and the associated pluggable databases (PDBs).
Enterprise Manager enables you to switch easily between the root and a designated PDB.
In a multitenant environment, you can log in to a CDB or a PDB, and switch from a PDB to a different PDB or to the root.
Topics:
Different variations of the Enterprise Manager Database login page appear automatically based on the feature that you had requested while logging in.
To log into a multitenant environment as a multitenant container database (CDB) administrator (an Enterprise Manager user who has the CONNECT
privilege on the CDB target) to use a CDB-scoped feature:
Log into Oracle Enterprise Manager Cloud Control as either user SYSTEM
or SYSMAN
.
The URL is as follows:
https://
host
:
port
/em
Navigate to the Databases page.
Select the database that you want to access.
The database home page appears.
Select the menu item for the action that you want to perform, such as selecting Administration, then Security, and then Users to authenticate a user.
The Database Login page appears. The following example shows the Database Login page for the CDB (because the database name is shown as CDB$ROOT
). Because of this name, this page is colloquially referred to as the database login page for the root
of the multitenant environment. The Database field refers to the current database; had you selected a PDB, then the name of the PDB would appear in this field.
Log in using the appropriate credentials.
Remember that only common users can log into the root, and that the names of common users begin with C##
or c##
. Both common and local users can log into a PDB, depending on their privileges.
From Oracle Enterprise Manager, you can switch from one PDB to a different PDB, or to a the root.
At the top left side of the page, find the database link.
In the database link, the current container name appears. The following example shows that the current database is the CDB itself (CDB$ROOT
), colloquially known as the root.
Select the menu icon to the right of the container, and from this menu, select the database that you want to access.
If the menu item does not appear, then navigate to a page where it does appear, such as the Database home page.
When you decide which activity you want to perform (such as creating users), log in with the appropriate privileges.
If you attempt to perform an activity without first having authenticated with the appropriate privileges, then you will be prompted to log in with the appropriate privilege.
In a multitenant environment, Oracle Enterprise Manager enables you to create, edit, and drop common and local users.
Topics:
See Also:
"About Common Users and Local Users"A common user is a user that exists in the root and can access PDBs in the CDB.
To create a common user:
From the Enterprise Manager database home page, log into the root as a common user who has the common CREATE USER
and SET CONTAINER
privileges.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to a different PDB or to the root.
From the Administration menu, select Security, then Users.
If prompted, enter your login information. Afterward, the Users page appears.
Click Create.
The Create User page appears.
Select the options to create a common user and grant this user privileges.
Ensure that you preface the user name with C##
or c##
.
Click OK or Apply.
The common user is created in the root and will appear in the Users page for any associated PDBs.
See Also:
"About Creating Common User Accounts"You can edit a common user account from the root.
From the Enterprise Manager database home page, log into the root or to the PDB.
If you are logging into the root, then ensure that you are a common user who has the common CREATE USER
and SET CONTAINER
privileges. If you are logging into a PDB, ensure that you have the CREATE USER
privilege for that PDB.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB.
From the Administration menu, select Security, then Users.
If prompted, enter your login information. Afterward, the Users page appears. In the root, only common users are listed. In the PDB, both common and local users are listed.
Select the common user to be edited and then click Edit.
The Edit User page appears. For a common user in the root, you can modify all settings for the common user. For a common user in a PDB, you cannot change the user password, default tablespace, and temporary tablespace. The settings that you make apply only to the current PDB. The following screen shows how a common user Edit User page appears in a PDB.
Modify the common user as necessary.
Click Apply.
You can drop a common user from the root.
From the Enterprise Manager database home page, log into the root as a common user who has the common CREATE USER
and SET CONTAINER
privileges.
You cannot drop common users from PDBs.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB.
From the Administration menu, select Security, then Users.
If prompted, enter your login information. Afterward, the Users page appears, listing only common users.
Select the common user that you want to drop and then click Delete.
Confirm that you want to delete the common user.
A local user is a user that exists only in a specific PDB and does not have access to any other PDBs in the multitenant environment.
To create a local user:
From the Enterprise Manager database home page, log into the PDB as a local or common user who has the local CREATE USER
privilege.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Users.
If prompted, enter your login information. Afterward, the Users page appears, showing only local users for the current PDB.
Click Create.
The Create User page appears.
Select the options that create a local user and grant this user privileges.
Ensure that you do not preface the user name with C##
or c##
.
Click OK.
The local user is created in the current PDB.
See Also:
"About Creating Local User Accounts"You can edit a local user from the PDB in which the local user resides.
From the Enterprise Manager database home page, log into the PDB as a local or common user who has the local CREATE USER
privilege.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Users.
If prompted, enter your login information. Afterward, the Users page appears, showing only local users for the current PDB and common users.
Select the local user to be edited and then click Edit.
The Edit User page appears.
Modify the local user as necessary.
Click Apply.
You can drop a local user from the PDB in which the local user resides.
From the Enterprise Manager database home page, log into the PDB as a local or common user who has the local CREATE USER
privilege.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Users.
If prompted, enter your login information. Afterward, the Users page appears, showing only local users for the current PDB and common users. (You cannot drop common users from a PDB.)
Select the local user you want to drop and then click Delete.
Enterprise Manager prompts you to confirm deletion of the user.
Confirm that you want to delete the local user.
In a multitenant environment, you can use Oracle Enterprise Manager to create, edit, drop, and revoke common and local roles.
Topics:
See Also:
You can use a common role to assign a common set of privileges to common users. These roles are valid across all containers of the multitenant environment.
To create a common role:
From the Enterprise Manager database home page, log into the root as a common user who has the common CREATE ROLE
and SET CONTAINER
privileges.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Roles.
If prompted, enter your login information. Afterward, the Create Role page appears.
Click Create.
The Create Role page appears.
Select the options that create a common role and grant this role privileges.
Ensure that you preface the role name with C##
or c##
.
Click OK.
The common role is created in the root.
You can edit a common role from the root.
From the Enterprise Manager database home page, log into the root or to the PDB.
If you are logging into the root, then ensure that you are a common user who has the common CREATE ROLE
and SET CONTAINER
privileges. If you are logging into a PDB, ensure that you have the CREATE ROLE
privilege for that PDB.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Roles.
If prompted, enter your login information. Afterward, the Roles page appears. In the root, only common roles are shown. In the PDB, both common and local roles are shown.
Select the common role to be edited and then click Edit.
The Edit Role page appears. For a common user in the root, you can modify all settings for the common user.
For a common role in a PDB, you can only change the role's authentication and grant this user different roles, system privileges, object privileges, and consumer group privileges. These settings apply only to the current PDB.
Modify the common user as necessary.
Click Apply.
You can drop a common role from the root.
From the Enterprise Manager database home page, log into the root as a common user who has the common CREATE ROLE
and SET CONTAINER
privileges.
You cannot drop common roles from PDBs.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Roles.
If prompted, enter your login information. Afterward, the Roles page appears, showing only common roles.
Select the common role that you want to drop and then click Delete.
Confirm that you want to delete the common role.
You can revoke common privilege grants from the root.
To revoke common privilege grants:
From the Enterprise Manager database home page, log into the root as a common user who has the common CREATE USER
, CREATE ROLE
, and SET CONTAINER
privileges.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Users.
The Users page lists the common users.
Select the user whose privileges you want to revoke and then click Edit.
The Edit User page appears.
Select Roles or the appropriate Privileges tab.
Enterprise Manager displays a list of roles and privileges assigned to this user.
Select Edit List and then remove the roles or privileges as necessary.
Click the OK button.
A common role can be used to assign a local set of privileges to local users later. These roles will be valid across PDB containers for whom they are defined.
To create a local role:
From the Enterprise Manager database home page, log into the PDB as a user who has the local CREATE ROLE
privilege.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Roles.
The Roles page appears.
Click Create.
If prompted, enter your login information. Afterward, the Create Role page appears.
Select the options that create a local role and grant this role privileges.
Ensure that you do not preface the role name with C##
or c##
.
Click OK.
The local role is created in the current PDB.
You can edit a local role in the PDB in which the local role resides.
From the Enterprise Manager database home page, log into the PDB as a user who has the local CREATE ROLE
privilege.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Roles.
If prompted, enter your login information. Afterward, the Roles page appears, showing only local roles for the current PDB and common roles.
Select the local role to be edited and then click Edit.
The Edit User page appears.
Modify the local user as necessary.
Click Apply.
You can drop local role from the PDB in which the local role resides.
From the Enterprise Manager database home page, log into the PDB as a user who has the local CREATE ROLE
privilege.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Role.
If prompted, enter your login information. Afterward, the Roles page appears, showing only local roles for the current PDB and common roles. (You cannot drop common roles from a PDB.)
Select the local role you want to drop and then click Delete.
Enterprise Manager prompts you to confirm deletion of the role.
Confirm that you want to delete the local role.
You can revoke local privileges in the PDB in which the privileges are used.
To revoke local privilege grants:
From the Enterprise Manager database home page, log into the PDB as a common or local user who has the CREATE USER
and CREATE ROLE
privileges.
See "Logging into a Multitenant Environment in Enterprise Manager" for information about logging in and switching to the root or to another PDB
From the Administration menu, select Security, then Users.
If prompted, enter your login information. Afterward, the Users page appears. In a PDB, both common and local users are listed.
Select the user whose privileges you want to revoke and then click Edit.
The Edit User page appears.
Select Roles or the appropriate Privileges tab.
Enterprise Manager displays a list of roles and privileges assigned to this user.
Select Edit List and then remove the privileges as necessary.
Click the OK button.