用户验证-OS认证和口令认证测试

发表于:2014-2-28 11:15

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:tyger-oracle    来源:51Testing软件测试网采编

分享:
  SQLNET.AUTHENTICATION_SERVICES参数在SQLNET.ORA(位于$ORACLE_HOME/network/admin目录中) 文件中对于不同的操作系统SQLNET.AUTHENTICATION_SERVICES的取值会有些不一样,通常我们会用到下面的一些设置值:
  linux下: none  all nts 不设置或BEQ 四种情况
  第一种情况:
  参数SQLNET.AUTHENTICATION_SERVICES不设置或设置为BEQ---------口令认证和操作系统认证都启动
[oracle@tygeradmin]$ pwd
/u01/app/oracle/product/10.2.0/db_1/network/admin
[oracle@tyger admin]$ ls
listener.ora  samples  shrept.lst  sqlnet.ora  tnsnames.ora
[oracle@tyger admin]$ vim sqlnet.ora
NAME.DIRECTORY_PATH=(tnsnames,ezconnect)
SQLNET.AUTHENTICATION_SERVICES=(BEQ)
[oracle@tyger admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 28-FEB-2014 09:52:19
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=tyger )(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                28-FEB-2014 09:48:44
Uptime                    0 days 0 hr. 3 min. 34 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tyger )(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCL_XPT" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@whgg admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 28 09:52:50 2014
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
SYS@ORCL>exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@tyger admin]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs/
[oracle@tyger dbs]$ ls
hc_ORCL.dat  initdw.ora  init.ora  lkORCL  orapwORCL  spfileORCL.ora
[oracle@tyger dbs]$ sqlplus sys/oracle@ORCL as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 28 09:53:51 2014
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
SYS@ORCL>
  第二种情况:
  参数SQLNET.AUTHENTICATION_SERVICES设置为 all  -----------------------屏蔽口令认证都启用操作系统认证
[oracle@tyger admin]$ pwd
/u01/app/oracle/product/10.2.0/db_1/network/admin
[oracle@tyger admin]$ vim sqlnet.ora
NAME.DIRECTORY_PATH=(tnsnames,ezconnect)
SQLNET.AUTHENTICATION_SERVICES=(ALL)
[oracle@tyger admin]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 28 09:59:20 2014
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
SYS@ORCL>exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@tyger admin]$ sqlplus sys/oracle@ORCL as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Feb 28 09:59:39 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
ERROR:
ORA-12641: Authentication service failed to initialize
Enter user-name:
32/3<123>
重磅发布,2022软件测试行业现状调查报告~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2023
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号