作業系統認證與ORACLE密碼檔案認證方式
Operating system (OS) authentication and Password files authentication
所討論的是關於具有SYSDBA or SYSOPER的特權使用者的認證方式
目錄
1 overview of authentication for adminnistrator
2 Password file authentication method
3 OS authentication method
4 Preparing to Use OS Authentication
5 Preparing to Use Password File Authentication
6 OSDBA and OSOPER相關
1 overview of authentication for adminnistrator
To connect to Oracle as a privileged user over a local connection or a secure remote connection, you have the following options:
l You can connect and be authenticated by a password file; provided the database has a password file and you have been granted the SYSDBA or SYSOPER system privilege.
l If the server is not using a password file, or if you have not been granted SYSDBA or SYSOPER privileges and are therefore not in the password file, you can use OS authentication. On most operating systems, OS authentication for database dministrators involves placing the OS username of the database administrator in a special group, generically referred to as OSDBA.
(你只能夠在兩種情況下以 privileged user connect to database.
l 一個database user, have been granted the SYSDBA or SYSOPER system privilege. 透過Password file authenticated method.
Conn username/passwd as sysdba
l 在OS xxx 使用者環境下,如果這個使用者 xxx 是 OSDBA (dba) 組中的一員.
conn / as sysdba
Example: gdut is a normal user
2 Password file authentication method.
[gdut@redhat gdut]$ id
uid=500(gdut) gid=500(gdut) groups=500(gdut)
[gdut@redhat gdut]$ sqlplus /nolog
idle> conn / as sysdba
ERROR:
ORA-01031: insufficient privileges
idle> conn mouse/mouse as sysdba --- “mouse is a normal database user”
ERROR:
ORA-01031: insufficient privileges
After
idle> grant sysdba to mouse;
Grant succeeded.
Again:
idle> conn mouse/mouse as sysdba
Connected.
Of course, the REMOTE_LOGIN_PASSWORDFILE must be exclusive to use password file authentication.
idle> show parameter remote_login_passwordfile
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
remote_login_passwordfile string NONE
idle> alter system set remote_login_passwordfile=none scope=spfile;
System altered.
[gdut@redhat gdut]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Sun May 2 01:09:12 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
idle> conn mouse/mouse as sysdba
ERROR:
ORA-01031: insufficient privileges
3 OS authentication method
[oracle@redhat dbs]$ id ---- oracle is a member of dba group
uid=501(oracle) gid=501(dba) groups=501(dba),502(oinstall)
[oracle@redhat dbs]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Sun May 2 01:01:49 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
idle> conn / as sysdba
Connected.
Your choice will be influenced by whether you intend to administer your database locally on the same machine where the database resides, or whether you intend to administer many different databases from a single remote client.
4 Preparing to Use OS Authentication
To enable authentication of an administrative user using the operating system you must do the following:
1. Create an operating system account for the user.
2. Add the user to the OSDBA or OSOPER operating system defined groups.
3. Ensure that the initialization parameter, REMOTE_LOGIN_PASSWORDFILE, is set to NONE. This is the default value for this parameter.
show parameter remote_login_passwordfile
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
這是怎麼回事,remote_login_passwordfile 並不是NONE,但仍可用OS authenticated method login ?
兩種方式可以並存
Operating system authentication takes precedence over password file authentication. (因為OS 認證方式優於Password File 認證方式)
Connecting Using OS Authentication
A user can be authenticated, enabled as an administrative user, and connected to a local database by typing one of the following SQL*Plus commands:
CONNECT / AS SYSDBA
CONNECT / AS SYSOPER
For a remote database connection over a secure connection, the user must also specify the net service name of the remote database:
CONNECT /@net_service_name AS SYSDBA
CONNECT /@net_service_name AS SYSOPER
OS authentication has nothing to do with whether you connect database locally or remotely.
5 Preparing to Use Password File Authentication
To enable authentication of an administrative user using password file authentication you must do the following:
1. Create an operating system account for the user.
2. If not already created, create the password file using the ORAPWD utility:
ORAPWD FILE=filename PASSWORD=password ENTRIES=max_users
3. Set the REMOTE_LOGIN_PASSWORDFILE initialization parameter to EXCLUSIVE.
4. Connect to the database as user SYS (or as another user with the administrative privilege).
5. If the user does not already exist in the database, create the user. Grant the SYSDBA or SYSOPER system privilege to the user:
GRANT SYSDBA to scott;
This statement adds the user to the password file, thereby enabling connection AS SYSDBA.
如果使用者所在的組是OSDBA group (dba), 那麼就可以在這個使用者下 conn / as sysdba ,以作業系統認證方式登入,否則報insufficient privileges.
6 OSDBA and OSOPER相關
Two special operating system groups control database administrator connections when using OS authentication. These groups are generically referred to as OSDBA and OSOPER.
The following describes how membership in the OSDBA or OSOPER group affects your connection to Oracle:
If you are a member of the OSDBA group, and specify AS SYSDBA when you connect to the database, you are granted the SYSDBA system privilege.
If you are a member of the OSOPER group, and specify AS SYSOPER when you connect to the database, you are granted the SYSOPER system privilege.
If you are not a member of the associated operating system group for SYSDBA or SYSOPER system privileges, the CONNECT command fails.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10248702/viewspace-624777/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【登陸認證】oracle的作業系統認證和口令檔案認證方式(轉載)Oracle作業系統
- 關於ORACLE作業系統認證和ORAPWD密碼檔案認證SYSDBA許可權Oracle作業系統密碼
- Oracle中兩種認證方式:OS認證與口令檔案認證Oracle
- Oracle 作業系統認證Oracle作業系統
- Oracle作業系統認證Oracle作業系統
- 不同作業系統上遮蔽oracle的作業系統認證方式作業系統Oracle
- Oracle OS認證與口令檔案認證詳解Oracle
- 1.6.5. 使用密碼檔案認證密碼
- Oracle OS認證、口令檔案、密碼丟失處理Oracle密碼
- 1.6.4.2. 準備作業系統認證作業系統
- 在windows透過作業系統認證登入ORACLEWindows作業系統Oracle
- 在windows通過作業系統認證登入ORACLEWindows作業系統Oracle
- Oracle OS 認證, 口令檔案Oracle
- ASM認證與口令檔案ASM
- oracle os認證和口令檔案認證的簡要解析Oracle
- oracle登陸認證方式Oracle
- redis配置認證密碼Redis密碼
- 禁用作業系統認證作業系統
- 關於os認證和口令檔案認證
- 【認證與授權】2、基於session的認證方式Session
- 使用oracle的作業系統認證(Operating System Authentication)的方法Oracle作業系統
- 關於os認證和口令檔案認證(轉)
- 通過AIX 6.1 作業系統管理員認證AI作業系統
- SQLNET.AUTHENTICATION_SERVICES和作業系統認證SQL作業系統
- 今天安裝的資料庫出現作業系統認證可以透過,口令檔案認證不能透過的情況.資料庫作業系統
- 系統登入認證流程對比(cookie方式與jwt)CookieJWT
- 作業系統(AIX)雙因素身份認證解決方案作業系統AI
- oracle兩種登陸認證方式Oracle
- os認證、口令檔案認證及兩個引數【轉】
- 認證系統之登入認證系統的進階使用 (二)
- Redis使用認證密碼登入Redis密碼
- redis設定認證密碼操作Redis密碼
- SSH認證免密碼登入密碼
- DRF內建認證元件之自定義認證系統元件
- Oracle 密碼驗證方式Oracle密碼
- os認證和口令檔案!
- Oracle 認證網Oracle
- oracle兩種認證方式總結(ZT)Oracle