设为首页 收藏本站
查看: 620|回复: 0

[经验分享] ORACLE 初始化参数OS_AUTHENT_PREFIX、REMOTE_OS_AUTHENT

[复制链接]

尚未签到

发表于 2016-7-26 11:34:49 | 显示全部楼层 |阅读模式
PropertyDescriptionParameter typeStringSyntaxOS_AUTHENT_PREFIX =authentication_prefixDefault valueOPS$ModifiableNo

OS_AUTHENT_PREFIXspecifies a prefix that Oracle uses to authenticateusers attempting to connect to the server. Oracle concatenates the value of this parameter to the beginning of the user's operating system account name and password. When a connection request is attempted, Oracle compares the prefixed username with Oracleusernames in the database.
The default value of this parameter isOPS$for backward compatibility with previous versions. However, you might prefer to set the prefix value to "" (a null string), thereby eliminating the addition of any prefix to operatingsystem account names.

OS_AUTHENT_PREFIX指定了Oracle用于验证用户尝试连接到服务器的前缀。Oracle连接此参数值到用户操作系统账号和密码的开头。当请求一个连接时,Oracle将比较连接用户名前缀和Oracle数据库中名称的前缀。该参数默认值为OPS$,为了和早先版本向后兼容。然而,可能更适合将前缀设置为"" (空字符),从而消除了任何前缀操作系统账号名称的增加。(通过操作系统用户认证的方式访问数据库,对应的数据库中的用户需要启动外部验证。这样的话操作系统用户就可以直接执行sqlplus/ 来访问数据库,而不需要输入用户名和密码了)

Note:
The text of theOS_AUTHENT_PREFIXparameteris case sensitive on some operating systems.
OCP试题中有一道题,考察此知识点:
The database instance has the following parameter setting:

OS_AUTHENT_PREFIX = OPS$
OS_ROLES = FALSE
REMOTE_OS_AUTHENT = FALSE
REMOTE_OS_ROLES = FALSE
TIMED_OS_STATISTICS = 0


You have a local operating system user SKD. You create a database user OPS$SKD, and then
assign external authentication. The user OPS$SKD has the CREATE SESSION privilege.

Whatwould you achieve by the above process?

A.The database user OPS$SKD will be able to administer the database.
B.The authentication detail for the database user OPS$SKD is recorded in the password file.
C.The local operating system user SKD will be able to access the database instance withoutspecifying the username and password.
D.The database user OPS$SKD has to login with the password of the local operating system userSKD to access the database instance.

The answer is C
实验:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE  11.2.0.1.0   Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

[oracle@yjgocp ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 6 10:34:25 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter os_auth
NAME                 TYPE    VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix          string   OPS$
remote_os_authent          boolean   FALSE

--创建ops$开头的用户,并启用外部验证
SQL> create user ops$oracle identified byexternally;
User created.
SQL> select username,password,account_status from dba_users;
USERNAME            PASSWORD            ACCOUNT_STATUS
------------------------------ ------------------------------ --------------------------------
RC_OCP                            OPEN
U_TP6                             OPEN
V_USER1                            OPEN
U_1                              OPEN
GYJ                              OPEN
SCOTT                             OPEN
OPS$ORACLE                          OPEN


SQL> grant connect to ops$oracle;
Grant succeeded.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.

Total System Global Area 422670336 bytes
Fixed Size         1336960 bytes
Variable Size       348129664 bytes
Database Buffers      67108864 bytes
Redo Buffers        6094848 bytes
Database mounted.
Database opened.

[oracle@yjgocp ~]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)


[oracle@yjgocp ~]$ sqlplus /
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jun 6 10:32:10 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user;
USER is "OPS$ORACLE"




REMOTE_OS_AUTHENT
PropertyDescriptionParameter typeBooleanDefault valuefalseModifiableNoRange of valuestrue | false

  
REMOTE_OS_AUTHENTspecifies whether remote clients will be authenticatedwith the value of theOS_AUTHENT_PREFIXparameter.
Note:
TheREMOTE_OS_AUTHENTparameter is deprecated. It is retained for backward compatibility only.
参数REMOTE_OS_AUTHENT用来控制是否允许远端操作系统验证。默认为false,该参数也只是为了向前兼容,如果按照下面的设置,
那么也会像本地操作体统用户一样不用用户名密码就可以访问实例;风险大,不建议使用;
ALTERSYSTEM SET REMOTE_OS_AUTHENT = TRUE SCOPE = SPFILE;

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-249639-1-1.html 上篇帖子: Oracle企业管理器错误解决方法.txt 下篇帖子: Oracle数据库字符集问题解决方案大全(转载)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表