remote_os_authent参数测试!
来源:互联网 发布:w3cschool php 手册 编辑:程序博客网 时间:2024/06/08 10:43
client端普通用户os验证过程:
1、保证参数remote_os_authent=true
SQL> show parameter remote_os_authent
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_os_authent boolean TRUE
SQL>
2、在server端保证sqlnet.ora中
SQLNET.AUTHENTICATION_SERVICES= (none)
必须是none,我测试client端SQLNET.AUTHENTICATION_SERVICES的
设置无关紧要
3、注意参数os_authent_prefix的值,如果os_authent_prefix有值
,不为null,则创建用户时也要加上os_authent_prefix的前缀
SQL> show parameter os_authent_prefix
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string OPS$
4、在clinet端确定username:
C:>set username
USERNAME=user
此时client端的username是user
5、在db中创建外部验证的用户,确定这个用户名其实非常关键,我们可以通过
audit功能准确的确定client端使用外部验证时的用户名:
SQL> show parameter audit_trail
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_trail string DB
SQL> audit session whenever not successful;
审计已成功。
SQL> select os_username,username from dba_audit_session;
OS_USERNAM USERNAME
---------- ------------------------------
user OPS$USER
SQL>
这里通过审计记录的结果发现os_username是user,但是username却是
OPS$USER,而OPS$USER正是我们创建外部用户所需要的用户名:
6、创建外部用户,注意大小写,我发现大写可以,小写不好用:
SQL> create user "ops$user" identified by externally;
用户已创建。
SQL> grant connect to "ops$user";
授权成功。
client端:
C:>sqlplus /@a
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 5月 21 12:39:09 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝
--==================================================
SQL> create user "OPS$USER" identified by externally;
用户已创建。
SQL> grant connect to "OPS$USER";
授权成功。
client端:
C:>sqlplus /@a
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 5月 21 12:40:11 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show user
USER "OPS$USER"
SQL>
7.不需要在server端的注册表中设置环境变量auth_prefix_domain=false
8.server端os认证和client端os认证冲突,因为server端os认证要求
SQLNET.AUTHENTICATION_SERVICES= (nts)而client端os认证要求SQLNET.AUTHENTICATION_SERVICES= (none)
9.sys用户在client端如何实现os认证呢?
暂时是我的疑问,为什么只好用了一次:
C:>sqlplus /@a as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 5月 21 12:54:28 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string ORCL
SQL> select host_name from v$instance;
HOST_NAME
----------------------------------------------------------------
XYS
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
C:>sqlplus /@a
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 5月 21 12:55:48 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
C:>sqlplus /@a as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 5月 21 12:55:55 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: 权限不足
请输入用户名:
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝
C:>
C:>
C:>sqlplus /@a as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 5月 21 12:56:19 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01031: 权限不足
请输入用户名:
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝
请输入用户名:
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝
SP2-0157: 在 3 次尝试之后无法连接到 ORACLE, 退出 SQL*Plus
C:>sqlplus /@a
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 5月 21 12:56:21 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
从 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
- remote_os_authent参数测试!
- 初始化参数REMOTE_OS_AUTHENT测试
- 初始化参数REMOTE_OS_AUTHENT
- 初始化参数REMOTE_OS_AUTHENT简析
- ORACLE 初始化参数OS_AUTHENT_PREFIX、REMOTE_OS_AUTHENT
- remote_os_authent
- Oracle的REMOTE_LOGIN_PASSWORDFILE和REMOTE_OS_AUTHENT参数
- O7_DICTIONARY_ACCESSIBILITY&REMOTE_OS_AUTHENT
- 用os_authent_prefix与remote_os_authent实现操作系统认证
- 用os_authent_prefix与remote_os_authent实现操作系统认证
- 不定长参数测试
- standby_file_management 参数测试
- apache ab 测试 参数
- jsp页面参数测试
- 参数化测试
- JUnit4参数化测试
- testng参数化测试
- 线程测试参数ThreadPoolExecutor()
- java编码之间转换
- 一目了然理解多表关联查询方式(图析)
- 通过分析SQL语句的执行计划优化SQL(总结)
- ADF BC 组件的运行时介绍 -1 Application Module的状态管理
- 如何在VC++6.0下实现Unicode编程
- remote_os_authent参数测试!
- js 操作select和option
- 使用phpMyAdmin时出现问题
- SQL 2005 with(nolock)详解
- 用dataGridView实现对数据库数据的修改并显示
- openstack 资料
- Windows系统下存在的4条最基本路由
- Android-X86虚拟机,你变化我评测
- sql2000取当前月的天数