查看: 800|回复: 2

oracle的认证方式

 关闭 [复制链接]

签到天数: 2592 天

连续签到: 6 天

[LV.Master]至尊海神IIIIII

发表于 2010-8-6 20:37 | 显示全部楼层 |阅读模式
oracle的认证方式


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

涉及两个参数
os_authent_prefix
remote_os_authent

把总结放这里吧,好看:
os_authent_prefix =ops$时,操作系统验证和口令验证用户都可以通过sqlplus /登陆
os_authent_prefix ="" 时,只有操作系统验证用户可以sqlplus /登陆,口令验证用户要输入用户名密码
remote_os_authent=true时,操作系统验证用户在远程linux系统下可以conn user1/user1@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
<
PCOS系统下载站:http://zhuangji.wang

签到天数: 1414 天

连续签到: 0 天

[LV.10]逍遥海仙III

发表于 2010-8-6 20:53 | 显示全部楼层
看看oracle的认证方式
PCOS系统下载站:http://zhuangji.wang
回复 支持 反对

使用道具 举报

签到天数: 1092 天

连续签到: 0 天

[LV.10]逍遥海仙III

发表于 2010-8-6 22:44 | 显示全部楼层
收藏下慢慢学习吧
PCOS系统下载站:http://zhuangji.wang
回复 支持 反对

使用道具 举报

本版积分规则