Chinaunix首页 | 论坛 | 博客
  • 博客访问: 374268
  • 博文数量: 113
  • 博客积分: 3035
  • 博客等级: 中校
  • 技术积分: 1430
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-01 16:32
文章分类
文章存档

2011年(42)

2010年(70)

2009年(1)

我的朋友

分类: Oracle

2010-08-03 15:27:19

三种认证方式:
数据库
OS
网络

涉及两个参数
os_authent_prefix
remote_os_authent

把总结放这里吧,好看:
os_authent_prefix =ops$时,操作系统验证和口令验证用户都可以通过sqlplus /登陆
os_authent_prefix ="" 时,只有操作系统验证用户可以sqlplus /登陆,口令验证用户要输入用户名密码
remote_os_authent=true时,操作系统验证用户在远程linux系统下可以conn /@fox10g成功

实验一:os_authent_prefix=ops$,remote_os_authent=false时,外部验证和口令验证都能在服务器上通过sqlplus /登陆成功。系统会使用ops$操作系统用户名来登陆
SQL> show parameter  auth

NAME                                 TYPE        VALUE
------------------------------------ ----------- -----------
os_authent_prefix                    string      ops$
remote_os_authent                    boolean     FALSE
SQL> create user ops$user1 identified externally;

User created.

SQL> create user ops$user2 identified by pass;

User created.

SQL> grant connect to ops$user2;

Grant succeeded.

SQL> grant connect to ops$user1;

Grant succeeded.


实验二:
SQL> show parameter auth

NAME                                 TYPE        VALUE
------------------------------------ ----------- ---------------
os_authent_prefix                    string
remote_os_authent                    boolean     FALSE
SQL> create user user1 identified externally;

User created.

SQL> create user user2 identified by pass;

User created.
SQL> grant connect to user1,user2;

Grant succeeded.
在linux系统上
user1可以通过sqlplus /登陆
user2报错ORA-01017: invalid username/password; logon denied
只能通过密码登陆
远程上

实验三:
SQL> show parameter auth

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix                    string
remote_os_authent                    boolean     TRUE

在linux服务器上
user1可以sqlplus /登陆成功
user2用sqlplus /登陆仍然报错ORA-01017: invalid username/password; logon denied
user2使用密码可以登陆

远程windows环境
SQL> conn sys/oracle@fox10g as sysdba
ERROR:
ORA-24313: user already authenticated
SQL> conn user1/user1@fox10g
ERROR:
ORA-24315: illegal attribute type
SQL> conn user2/pass@fox10g
ERROR:
ORA-24315: illegal attribute type
linux环境:操作系统有用户user1
sqlplus user1/user1@fox10g 可以登陆成功

实验四:
SQL> show parameter auth

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix                    string      ops$
remote_os_authent                    boolean     TRUE
os_authent_prefix=ops$,remote_os_authent=true时,外部验证和口令验证都能在服务器上通过sqlplus /登陆成功。系统会使用ops$操作系统用户名来登陆
远程上
SQL> conn user2/pass@fox10g
Connected.
SQL> conn user1/user1@fox10g
ERROR:
ORA-01017: invalid username/password; logon denied

阅读(1326) | 评论(1) | 转发(0) |
0

上一篇:oracle的主要dump命令(转)

下一篇:角色管理

给主人留下些什么吧!~~

chinaunix网友2010-09-14 10:36:08

高手