oracle 三种认证方式,oracle的认证方式(一)

三种认证方式:

数据库

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

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值