作業系統認證與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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 1.6.5. 使用密碼檔案認證密碼
- 1.6.4.2. 準備作業系統認證作業系統
- 關於os認證和口令檔案認證(轉)
- 【認證與授權】2、基於session的認證方式Session
- Oracle 11g 密碼延遲認證與 library cache lock 等待Oracle密碼
- 系統登入認證流程對比(cookie方式與jwt)CookieJWT
- Redis使用認證密碼登入Redis密碼
- 作業系統(AIX)雙因素身份認證解決方案作業系統AI
- 認證系統之登入認證系統的進階使用 (二)
- DRF內建認證元件之自定義認證系統元件
- Oracle 認證下載Oracle
- 無密碼身份認證,跟密碼說再見!密碼
- 數字認證:密碼上雲之道密碼
- 聯瑞網路卡獲得銀河麒麟作業系統適配認證證書作業系統
- ETL認證申請方式
- 密碼安全和無密碼身份認證那些事兒密碼
- MySQL密碼加密認證的簡單指令碼MySql密碼加密指令碼
- 酒店賓館無線上網認證手機認證方式
- 中興新支點作業系統獲得國家安全作業系統四級認證作業系統
- Kubernetes客戶端認證——基於CA證書的雙向認證方式客戶端
- jQuery Validate驗證確認密碼是否相同jQuery密碼
- SpringBoot 整合 Shiro 密碼登入與郵件驗證碼登入(多 Realm 認證)Spring Boot密碼
- Django(64)頻率認證原始碼分析與自定義頻率認證Django原始碼
- 增強版實名認證介面-Java身份證實名認證介面程式碼-身份認證Java
- SSL認證失敗,製作證書
- 職業認證---系統整合工程師考試工程師
- 寬頻認證計費系統的認證技術主要有哪些
- SigFlip如何篡改身份認證碼簽名的PE檔案
- GKD認證指令碼指令碼
- 訊息認證碼
- 【認證與授權】Spring Security系列之認證流程解析Spring
- Linux 作業系統配置互信認證後,登入仍然需要輸入使用者密碼的解決辦法Linux作業系統密碼
- 建立遷移檔案 auth 認證表 users
- Spring Security OAuth2.0認證授權四:分散式系統認證授權SpringOAuth分散式
- nginx配置kibana訪問使用者名稱和密碼認證、及無認證訪問配置Nginx密碼
- 認證授權方案之JwtBearer認證JWT
- HTTP認證之基本認證——Basic(一)HTTP
- HTTP認證之基本認證——Basic(二)HTTP
- HTTP認證之摘要認證——Digest(一)HTTP