管理用户安全性-权限管理

1、外部认证用户

只要知道用户名,谁都可以连到数据库

SQL> show parameter auth

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix                    string      ops$
remote_os_authent                    boolean     FALSE

外部用户的前缀是 ops$

 

i.创建外部用户

[root@wyzc ~]# useradd foway;

[root@wyzc ~]# usermod -g oinstall foway;
[root@wyzc ~]# su foway
[foway@wyzc root]$ id
uid=54322(foway) gid=54321(oinstall) groups=54321(oinstall)

ii.在oracle用户下授权两个基本权限

SQL> create user ops$foway identified externally;

User created.

SQL> grant connect,resource to ops$foway;

Grant succeeded.

iii.设置foway操作系统用户对应的$ORACLE_HOME与$ORACLE_SID

[foway@wyzc ~]$ export ORACLE_HOME=/u01/oracle/10g
[foway@wyzc ~]$ export ORACLE_SID=wyzc10g

iv.以操作系统用户登录到数据库

[foway@wyzc ~]$ /u01/oracle/10g/bin/sqlplus /

SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jun 3 18:45:32 2016

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options

SQL>

 

2、设置远程操作系统认证
SQL> show parameter auth

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix                    string      ops$
remote_os_authent                    boolean     FALSE

如下,修改为允许远程登录

SQL> alter system set remote_os_authent=true scope=spfile;

System altered.

 

3、完成两个步骤:

i.安装Oracle客户端(不是瘦客户端),使windows下用cmd命令可以连接Oracle服务器

ii.windows下的用户名与上述用户名(操作系统认证)foway保持一致即可

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值