1. 首页
  2. IT资讯

os认证

SQL> select * from v$version where rownum=1;
BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production

SQL> !uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Mon Mar 29 20:06:41 EDT 2010 i686 i686 i386 GNU/Linux

关于入门oracle时,os认证(和外部验证),网络配置是很让人头痛的事,前面写过几篇文章关于网络配置(http://blog.itpub.net/29876893/viewspace-1626684/   http://blog.itpub.net/29876893/viewspace-1691336/     http://blog.itpub.net/29876893/viewspace-1465317/),希望给大家学习之处带来帮助。

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 6月 17 23:32:13 2015

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

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

SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
[oracle@localhost ~]$ sqlplus  xxx/xxxx as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 6月 17 23:32:32 2015

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

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

SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
[oracle@localhost ~]$ sqlplus w/  as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期三 6月 17 23:32:47 2015

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

输入口令: 

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

SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开


我们不需要输入用户名和密码就可以以sys用户登录数据库,这种方式是os认证,不需要我们输入用户及密码,到底是什么原因呢?
l
LINUX下:
1.在/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora里添加
SQLNET.AUTHENTICATION_SERVICES=(all)这样可以使用os认证,或者把这句话直接注释(删除)了:
#SQLNET.AUTHENTICATION_SERVICES=(all)
如果不想启用os认证,可以:
SQLNET.AUTHENTICATION_SERVICES=(none)或者SQLNET.AUTHENTICATION_SERVICES=(nts)或者QLNET.AUTHENTICATION_SERVICES=()
此时不能使用os认证:
[oracle@localhost admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期四 6月 18 10:33:13 2015

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

ERROR:
ORA-01031: insufficient privileges

2.当然还可以oracle的安装用户从组oinstall中删除掉,当然也可以直接把oinstall这个组也删除,都可以屏蔽os功能


Windows下:
1.同理就是F:oracleAdministratorproduct11.2.0clientnetworkadminsqlnet.ora中添加:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
如果注释这句话或者SQLNET.AUTHENTICATION_SERVICES= (none)可以屏蔽os验证
Windows上和linux有点不同,大家注意。
2.在计算机管理 -> 本地用户和组 -> 组中找到ORA_DBA  右击单击ORA_DBA后,在弹出的菜单中选择属性,打开ORA_DBA属性对话框,可以看到ORA_DBA组中有sys成员,当把sys从该组删除后可屏蔽os验证。

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

主题测试文章,只做测试使用。发布者:℅傍ㄖ免沦陷dε鬼,转转请注明出处:http://www.cxybcw.com/191883.html

联系我们

13687733322

在线咨询:点击这里给我发消息

邮件:1877088071@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code