Oracle管理員的兩種認證方法

2021-05-21 23:37:39 字數 2415 閱讀 4393

oracle管理員的兩種認證方法

注意:重要

parameter 中remote_login_passwordfile

1、alter system set remote_login_passwordfile=nonescope =spfile;

含義:非密碼認證(此時僅os認證 )

2、alter system set remote_login_passwordfile=exclusivescope =spfile;

含義:密碼檔案認證(此時可 os認證);

network/admin/sqlnet.ora檔案中sqlnet.authentication_services

1、sqlnet.authentication_services =nts  表示os認證+密碼檔案認證2種方式均可

2、sqlnet.authentication_services=none時 表示僅密碼檔案認證

1、管理員的許可權:

sysdba: 預設schema 為sys

sysoper: 預設schema 為 public

這兩種許可權允許使用者在資料庫沒有開啟的時候就可以登陸資料庫,所以這種許可權的控制權在資料庫之外。通常這種許可權也可以被看做一種允許你對資料庫進行某種操作的連線,比如connect / as sysdba

2、兩種管理員許可權認證方法

(1) operating system (os) authentication :作業系統認證

--以下情況使用該方法:

管理遠端資料庫時,具有安全的網路連線(secure connection)。

管理本地資料庫時,想使用os認證。

--操作步驟:

a.建立乙個os系統使用者

b.將這個使用者加入到osdba或者osoper的os組。

c.設定引數remote_login_passwordfile=none

d.connect / as sysdba

--關於osdba和osoper組

osdba對應: unix為dba; windows為ora_dba

osoper對應:unix為oper; windows為ora_oper

這些使用者組在安裝資料庫的時候手工或者自動建立,這些組的成員以 as sysdba/sysoper 連線資料庫後,自動授予sysdba/sysoper的管理許可權。

這種os認證的使用者,os級別有多個使用者(只要屬於ora_dba即可),但登入到資料庫後,都對應sysdba使用者sys。

(2) password files :密碼檔案認證

--以下情況使用該方法:

管理遠端資料庫時,沒有安全的網路連線(secure connection),比如tcp/ip和decnet協議。

管理本地資料庫時,不想使用os認證。

--操作步驟:

a.使用orapwd建立密碼檔案(其中的password選項是為sys使用者設定的)

b.設定引數remote_login_passwordfile=exclusive

c.使用sys使用者登陸

d.在資料庫中建立使用者 create user donny1 identified by donny1;

e. 賦予其sysdba/sysoper許可權

grant sysdba to donny1; 這樣就將使用者和密碼加入到密碼檔案中。

f.使用自己的密碼logon: connect donny1/donny1 as sysdba;

g.os認證優先於密碼檔案認證:

只要os使用者屬於osdba or oroper組,並且使用connect as sysdba / sysoper登入,則可以忽略輸入的username/password.

總結:也就是已經屬於ora_dba的那些使用者仍然可以不用輸入密碼,在資料庫中新加的那些被授權的sysdba許可權的使用者需要出示密碼才能登入管理。是2中認證相容的情況。比較實用。

3、關於remote_login_ passwordfile

none:

使得oracle不使用密碼檔案,只能使用os認證,不允許通過不安全網路進行遠端管理。

exclusive:

以使用唯一的密碼檔案,但只限乙個instance 。密碼檔案中可以包括除了sys使用者的其他使用者。

shared:

可以在多個資料庫上使用共享的密碼檔案。但是密碼檔案中只能包含sys使用者。通常用於乙個dba管理多個資料庫的時候。

4、v$pwfile_users

使用該檢視檢視密碼檔案中的member

oracle兩種認證方式總結

oracle 資料庫通過 sqlnet.ora 檔案中的引數 sqlnet.authentication services,引數檔案中的 remote login passwordfile 和口令檔案 pwdsid.ora 三者協同作用實現身份認證 sqlnet.authentication ser...

oracle兩種認證方式總結

oracle 資料庫通過 sqlnet.ora 檔案中的引數 sqlnet.authentication services,引數檔案中的 remote login passwordfile 和口令檔案 pwdsid.ora 三者協同作用實現身份認證 sqlnet.authentication ser...

Oracle兩種登入認證方式

oracle 資料庫通過 sqlnet.ora 檔案中的引數 sqlnet.authentication services,引數檔案中的 remote login passwordfile 和口令檔案 pwdsid.ora 三者協同作用實現身份認證 sqlnet.authentication ser...