Oracle DB 本地认证os_authent_prefix 与 远程认证remote_os_authent
一、os_authent_prefix 与 remote_os_authent的理解
os_authent_prefix是Oracle用来验证用户尝试连接到server时指定的一个前缀。oracle把该参数的值和操作系统账户名和密码连接起来。当需要连接的时候,Oracle 把带有前缀的操作系统用户名和数据库中Oracle的用户名进行比较。 为了和之前的版本兼容,该参数的默认值为OPS$。当然也可以将该参数设为空,这样可以消除给操作系统的账户添加任何的前缀
remote_os_authent是Oracle允许用户通过采用外部验证的方式登录数据库。默认情况下,只允许本机的用户采用外部验证登录到数据库中。当将remote_os_authent这个参数设置为true时,则允许远端用户采用外部验证的方式登录到数据库中。
二、本地操作系统认证
1、 查看os_authent_prefix参数初始值
2、创建以ops$前缀开头的本地用户
3、给ops$oracle用户授权
4、用oracle用户免密码登录
就可以免密码登录了,登录用户是ops$oracle。
三、远程操作系统认证
1、查看os_authent_prefix 和 remote_os_authent参数初始值
2、修改remote_os_authent=true
3、重启数据库,使参数生效
4、创建和远程电脑相同的用户并赋予权限
5、连接名的配置并用远程用户进行登录验证
oo的配置:
可以看到可以远程免密码登录。oo是连接名。
ps:remote_os_authent这个参数开启后,存在很大的安全隐患,远端服务器只要根据数据库中存在的外部用户来创建用户,就可以登陆到数据库中,因此除非必要,否则不建议开启这个参数.
参考网址:
http://blog.itpub.net/31397003/viewspace-2126843/
https://blog.****.net/huang_xw/article/details/6527770