Heim  >  Artikel  >  Datenbank  >  Oracle 禁止操作系统认证登录

Oracle 禁止操作系统认证登录

WBOY
WBOYOriginal
2016-06-07 17:13:341403Durchsuche

Oracle 禁止操作系统认证登录,这种操作系统认证方式登录数据库,即使使用的是错误的用户名和密码依然可以顺利的登录到数据库中.

1.以操作系统认证方式登录数据库的方法

1)最基本的方法就是使用“sqlplus / as sysdba”登录数据库

sqlplus / as sysdba

斜杠“/”左面是用户名,,右面是密码,这里表示不给出用户名和密码一样可以登录到数据库系统中


2)使用正确的用户名和密码登陆数据库

sqlplus sys/password as sysdba

显然,登录完全没有问题。


3)使用错误的用户名和密码登陆数据库

sqlplus wind/wind as sysdba

这种操作系统认证方式登录数据库,即使使用的是错误的用户名和密码依然可以顺利的登录到数据库中.

2.禁用操作系统认证方式登录数据库

编辑Oracle_HOME/network/admin/sqlnet.ora

SQLNET.AUTHENTICATION_SERVICES=(NONE)


3.验证是否生效

1)必须使用正确的用户名和密码才能登陆到系统中


C:\>sqlplus sys/password as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on 星期三 2月 16 13:41:14 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>


2)使用正确的用户名和错误的密码进行登录测试


C:\Users\Administrator>sqlplus sys/wind as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on 星期三 2月 16 13:40:35 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


请输入用户名:


3)使用“sqlplus / as sysdba”登录方式进行验证

C:\>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on 星期三 2月 16 13:42:29 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges

请输入用户名:

更多Oracle相关信息见Oracle 专题页面 ?tid=12

linux

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn