ITPub博客

首页 > 数据库 > Oracle > REMOTE_OS_AUTHENT参数详解

REMOTE_OS_AUTHENT参数详解

Oracle 作者:pyzwj 时间:2015-07-23 17:43:17 0 删除 编辑

remote_os_authent概述

Oracle允许用户通过采用外部验证的方式登录数据库。默认情况下,只允许本机的用户采用外部验证登录到数据库中。当将remote_os_authent这个参数设置为true时,则允许远端用户采用外部验证的方式登录到数据库中。

关于外部验证,请参见笔者的下面文章

http://czmmiao.iteye.com/blog/1239822

示例如下

target数据库上

SQL> show parameter os_aut
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix                    string
remote_os_authent                    boolean     TRUE

SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
czmmiao

source数据库上

[hr@ha2 ~]$ id
uid=501(hr) gid=503(hr) groups=501(oinstall),503(hr)

连接到target数据库,其中oookkk为tnsname.ora中的连接字符串
[hr@ha2 ~]$ sqlplus /@oookkk
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 7 17:37:05 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> show user;
USER is "HR"

 

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
czmmiao

将target数据库上的remote_os_authent设置为false

SQL> alter system set remote_os_authent=false scope=spfile;
System altered.

SQL> startup force;
ORACLE instance started.
Total System Global Area  373293056 bytes
Fixed Size                  1219496 bytes
Variable Size             201327704 bytes
Database Buffers          167772160 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.


SQL> show parameter remote_os_authent
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_os_authent                    boolean     FALSE
 
从source数据库登录到target数据库

[hr@ha2 ~]$ sqlplus /@oookkk
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 7 17:39:52 2011
Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied
总结:如果你破解了对方操作系统的用户名和密码,remote_os_authent=true时,就可以直接连接 对方的数据库(不用用户和密码),这样很不安全,一般默认false即可。


转自:http://czmmiao.iteye.com/blog/1239857

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28194062/viewspace-1746020/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-09-25

  • 博文量
    63
  • 访问量
    303308