ORACLE體系結構--密碼文件管理

1.密碼文件的做用



具備 sysdba/sysoper權限 遠程登陸時,須要用到密碼文件

sqlplus / as sysdba //操做系統認證,用戶密碼即便不正確也能夠登陸,不安全

操做系統認證(只要能夠登陸這個操做系統,我就無論你的用戶名和密碼)
sqlnet.ora
sqlnet.authentication_services=(all|none)
none:關閉操做系統認證,使用密碼文件認證
all:使用操做系統認證,關閉本機密碼文件認證


關閉操做系統認證:linux

#cd  /u01/oracle/11g/network/admin/samples
#vim sqlnet.ora
      sqlnet.authentication_services=(none)

 密碼文件認證:
remote_login_passwordfilesql

SQL> show parameter remote

NAME      TYPE  VALUE
------------------------------------ ----------- ------------------------------
remote_dependencies_mode      string  TIMESTAMP
remote_listener       string
remote_login_passwordfile      string  EXCLUSIVE  //該文件存放密碼
remote_os_authent      boolean  FALSE
remote_os_roles       boolean  FALSE
result_cache_remote_expiration      integer  0
SQL>


none:關閉密碼文件認證,使用操做系統認證
exclive:使用獨佔的密碼文件認證
shared:多個實例共享同一個密碼文件 ---通常使用到集權環境中,不能用alter user 修改密碼會出現問題

修改有sysdba 權限的用戶密碼都不能修改爲功

關閉密碼文件認證:數據庫

>>>alter system set remote_login_passwordfile=none scope=spfile;vim


sqlnet.authenication_services=(none) //多種組合
remote_login_passwordfile=none
 windows

2.建立密碼文件



oracle$> orapwd //建立密碼文件
 安全

[oracle@up12 ~]$ orapwd
Usage: orapwd file=<fname> entries=<users> force=<y/n> ignorecase=<y/n> nosysdba=<y/n>

  where
    file - name of password file (required),
    password - password for SYS will be prompted if not specified at command line,
    entries - maximum number of distinct DBA (optional),
    force - whether to overwrite existing file (optional),
    ignorecase - passwords are case-insensitive (optional),
    nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
    
  There must be no spaces around the equal-to (=) character.



cd /u01/oracle/11g/dbs
orapwdORACLE_SID //linux系統中
pwdORACLE_SID //windows系統中

$ORACLE_HOME/dbs/orapeORACLE_SID
orapwd file=文件名 password=密碼 entries=5(能夠放的用戶,通常不跟他,跟塊的大小有關)
 oracle

3.查看密碼文件

select * from v$pwfile_users //查看密碼文件

SQL> select * from v$pwfile_users;

USERNAME        SYSDB SYSOP SYSAS                     //存放具備這三種權限的用戶
------------------------------ ----- ----- -----
SYS        TRUE  TRUE  FALSE



4.密碼文件的限制
限制用戶的遠程登陸
orapwORACLE_SID

5.密碼文件丟失處理
隻影響遠程登陸,不影響數據庫運行ui

相關文章
相關標籤/搜索