- Database Administrator's Reference
- Administering External Users and Roles on Windows
- Overview of Manually Administering External Users and Roles
- About Manually Creating an External Operating System User
- Performing External User Authentication Tasks on the Oracle Database Server
Performing External User Authentication Tasks on the Oracle Database Server
Use this procedure to perform external user authentication tasks.
Perform the following external user authentication tasks on the Oracle Database server:
- Add parameter
OS_AUTHENT_PREFIXto yourinit.orafile.The
OS_AUTHENT_PREFIXvalue is prefixed to local or domain user names attempting to connect to the server with the user's operating system name and password. The prefixed user name is compared with Oracle Database user names in the database when a connection request is attempted. Using parameterOS_AUTHENT_PREFIXwith Windows native authentication methods is the recommended method for performing secure, trusted client connections to your server. - Set a value for
OS_AUTHENT_PREFIX. Your choices are:-
Any character string
If you specify
xyz, as in this procedure's example, thenxyzis prefixed to the beginning of the Windows user name (for example,xyzjonesfor local userjonesorxyzsales\jonesfor domain userjoneson domainsales).String values are case insensitive. -
""(two double quotes with no space between)This option is recommended, because it eliminates the need for any prefix to Windows user names (for example,
jonesfor local userjonesorsales\jonesfor domain userjoneson domainsales). -
No value specified
If you do not specify a value for
OS_AUTHENT_PREFIX, it defaults toOPS$(for example,OPS$jonesfor local userjonesorOPS$sales\jonesfor domain userjoneson domainsales).
Note:
On Windows and Linux, create a database user name with characters in upper case for successful authentication. Authentication fails when you use characters with lower case. For example, authentication fails when creating a database user name with characters in lower caseops$sales\jones, but is successful when creating a database user name with upper case characters such asOPS$SALES\JONES. -
- Create a Windows local user name for
joneswith the Computer Management tool, or create a Windows domain user name forjoneswith Active Directory Users and Computers (if the appropriate name does not currently exist). See your operating system documentation for detailed instructions. - Ensure that parameter
SQLNET.AUTHENTICATN_SERVICESin filesqlnet.oracontainsnts. - Start SQL*Plus:
C:\> sqlplus /NOLOG
- Connect to the database with the SYSTEM database administrator (DBA) name:
SQL> CONNECT SYSTEM Enter password: system_passwordUnless you have changed it, the
SYSTEMpassword isMANAGERby default. - Create a local external user by entering:
SQL> CREATE USER xyzjones IDENTIFIED EXTERNALLY;
where
xyzis the value you chose for initialization parameterOS_AUTHENT_PREFIX, andjonesis the Windows local user name. - Grant a local external user database roles by entering:
SQL> GRANT DBA TO xyzjones;
Note:
External authentication of Windows Local users is supported from the same computer only. While external authentication of Windows Domain user is supported from the same computer or a different computer. - Create a domain external user by entering:
SQL> CREATE USER "XYZSALES\JONES" IDENTIFIED EXTERNALLY;
where
XYZis the value you chose for initialization parameterOS_AUTHENT_PREFIX, andSALES\JONESis the domain name and Windows domain user name. Double quotes are required and the entire syntax must be in uppercase. - Grant a domain external user database roles by entering:
SQL> GRANT DBA TO "XYZSALES\JONES";
Double quotes are required and the entire syntax must be in uppercase.
- Log on to the Windows system using the Windows local user
jonesor domain userSALES\JONES. - Connect to the database with the
SYSDBAname:SQL> CONNECT / AS SYSDBA
- Shut down the database:
SQL> SHUTDOWN
- Restart the database:
SQL> STARTUP
This causes the change to parameter
OS_AUTHENT_PREFIXto take effect.