非Oracle用户使用操作系统验证登陆(/ as sysdba)
之前写过一篇blog《新用户使用sqlplus / as sysdba登录报错》http://blog.csdn.net/bisal/article/details/9285087 今天碰巧看到一篇推荐的帖子《新建一个用户(非oracle),在不赋予dba所属组的情况下,不能使用操作系统验证》 http://www.itpub.net/thread
之前写过一篇blog《新用户使用sqlplus / as sysdba登录报错》http://blog.csdn.net/bisal/article/details/9285087
今天碰巧看到一篇推荐的帖子《新建一个用户(非oracle),在不赋予dba所属组的情况下,不能使用操作系统验证》
http://www.itpub.net/thread-1811278-1-1.html,也是按照实际操作的流程解释了处理的方法,很实际。
总结起来,使用非oracle用操作系统验证登录,需要做的:
1、设置相关环境变量;
2、将用户添加到dba组中;
3、用户具有$ORACLE_HOME相关路径(尤其是bin)文件的执行权限。
但上次调试一个测试库,创建非Oracle安装用户时也试了如上方法,但未奏效,肯定哪里还有点问题,找个时间再看看了要。
转:
新建一个用户(非oracle),在不赋予dba所属组的情况下,不能使用操作系统验证
[grid@dbaup ~]$ id
uid=1002(grid)gid=1003(grid) 组=1003(grid)
[grid@dbaup ~]$export ORACLE_BASE=/u01/oracle
[grid@dbaup ~]$export ORACLE_HOME=$ORACLE_BASE/product/11.0.2.1
[grid@dbaup ~]$export ORACLE_SID=gbk11g
[grid@dbaup ~]$export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
[grid@dbaup ~]$export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
--linux默认SQLNET.AUTHENTICATION_SERVICES=beq ,操作系统和密码验证都能使用,我下边并没有设none
[grid@dbaup ~]$ cat/u01/oracle/product/11.0.2.1/network/admin/sqlnet.ora
# sqlnet.ora NetworkConfiguration File: /u01/oracle/product/11.0.2.1/network/admin/sqlnet.ora
# Generated byOracle configuration tools.
NAMES.DIRECTORY_PATH=(TNSNAMES, EZCONNECT)
ADR_BASE =/u01/oracle
--操作系统认证报ORA-01031: insufficient privileges
[grid@dbaup ~]$sqlplus / as sysdba
SQL*Plus: Release11.2.0.1.0 Production on Tue Aug 20 21:39:04 2013
Copyright (c) 1982,2009, Oracle. All rights reserved.
ERROR:
ORA-01031:insufficient privileges
Enter user-name:
新开一个窗口(窗口2),为grid用户添加dba附加组
[root@dbaup ~]# idgrid
uid=1002(grid)gid=1003(grid) 组=1003(grid),1001(dba)
在窗口1重新登录gird用户,查看grid用户已经有dba附加组了
[gird@dbaup ~]$ exit
logout
[root@dbaup bin]# su- grid
[grid@dbaup ~]$ id
uid=1002(grid)gid=1003(grid) 组=1003(grid),1001(dba)
--重新设置环境变量
[grid@dbaup ~]$export ORACLE_BASE=/u01/oracle
[grid@dbaup ~]$export ORACLE_HOME=$ORACLE_BASE/product/11.0.2.1
[grid@dbaup ~]$export ORACLE_SID=gbk11g
[grid@dbaup ~]$export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
[grid@dbaup ~]$export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
--登录操作系统验证成功
[grid@dbaup ~]$sqlplus / as sysdba
SQL*Plus: Release11.2.0.1.0 Production on Tue Aug 20 21:42:36 2013
Copyright (c) 1982,2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11gEnterprise Edition Release 11.2.0.1.0 - 64bit Production
With thePartitioning, OLAP, Data Mining and Real Application Testing options
SQL>
为什么会出现这种情况呢?
[root@dbaup ~]# find/ -group dba
/u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
/u01/oracle/product/11.0.2.1/dbaup_ora11g/sysman/log
find:“/proc/20062/task/20062/fd/5”: 没有那个文件或目录
find:“/proc/20062/task/20062/fdinfo/5”: 没有那个文件或目录
find:“/proc/20062/fd/5”: 没有那个文件或目录
find:“/proc/20062/fdinfo/5”: 没有那个文件或目录
--发现/u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log所属组是dba,并且other没有任何权限
[root@dbaup ~]# ls-l /u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
总用量 5604
-rw-r-----. 1 oracleoinstall 0 6月 322:19 emagentfetchlet.log
-rw-r-----. 1 oracleoinstall 0 6月 322:19 emagentfetchlet.trc
-rw-r-----. 1 oracleoinstall 956 7月 29 17:04 emagent.log
-rw-r-----. 1 oracleoinstall 39430 7月 29 17:10 emagent_perl.trc
-rw-r-----. 1 oracleoinstall 757974 7月 29 18:49 emagent.trc
-rw-r-----. 1 oracleoinstall 11794 7月 29 18:49 emdb.nohup
-rw-r-----. 1 oracleoinstall 0 6月 322:18 emdctl.log
-rw-r-----. 1 oracleoinstall 3441 7月 29 17:04 emdctl.trc
-rw-r-----. 1 oracleoinstall 2443250 7月 29 18:49 emoms.log
-rw-r-----. 1 oracleoinstall 2443250 7月 29 18:49 emoms.trc
-rw-r-----. 1 oracleoinstall 0 6月 322:21 nfsPatchPlug.log
drwxr-----. 2 oracleoinstall 4096 6月 322:20 pafLogs
-rw-r-----. 1 oracleoinstall 0 6月 322:19 patchAgtStPlugin.log
-rw-r-----. 1 oracleoinstall 5279 6月 322:19 secure.log
[root@dbaup ~]# ls-ld /u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
drwxr-x---.3 oracle dba 4096 7月 29 17:04/u01/oracle/product/11.0.2.1/dbaup_gbk11g/sysman/log
结论:oracle之外的用户,在打开了操作系统验证的情况下,还需要加入dba组才能使用操作系统验证

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

Oracle不僅是數據庫公司,還是雲計算和ERP系統的領導者。 1.Oracle提供從數據庫到雲服務和ERP系統的全面解決方案。 2.OracleCloud挑戰AWS和Azure,提供IaaS、PaaS和SaaS服務。 3.Oracle的ERP系統如E-BusinessSuite和FusionApplications幫助企業優化運營。

在 Sublime 中運行代碼的方法有六種:通過熱鍵、菜單、構建系統、命令行、設置默認構建系統和自定義構建命令,並可通過右鍵單擊項目/文件運行單個文件/項目,構建系統可用性取決於 Sublime Text 的安裝情況。

Linux的主要用途包括:1.服務器操作系統,2.嵌入式系統,3.桌面操作系統,4.開發和測試環境。 Linux在這些領域表現出色,提供了穩定性、安全性和高效的開發工具。

MongoDB適合非結構化數據和高擴展性需求,Oracle適合需要嚴格數據一致性的場景。 1.MongoDB靈活存儲不同結構數據,適合社交媒體和物聯網。 2.Oracle結構化數據模型確保數據完整性,適用於金融交易。 3.MongoDB通過分片橫向擴展,Oracle通過RAC縱向擴展。 4.MongoDB維護成本低,Oracle維護成本高但支持完善。

自定義開發環境的方法有很多種,但全局 Git 配置文件是最有可能用於自定義設置(例如用戶名、電子郵件、首選文本編輯器和遠程分支)的一種。以下是您需要了解的有關全局 Git 配置文件的關鍵事項。

Java程序在不同架構CPU上的內存洩漏現象分析本文將探討一個Java程序在ARM和x86架構CPU上表現出不同內存行為的案�...

文章首段摘要:在選擇開發 Yi 框架應用程序的軟件時,需要考慮多個因素。雖然原生移動應用程序開發工具(如 XCode 和 Android Studio)可以提供強大的控制和靈活性,但跨平台框架(如 React Native 和 Flutter)憑藉其編寫一次,即可部署到多個平台的優點而越來越受歡迎。對於剛接觸移動開發的開發者,低代碼或無代碼平台(如 AppSheet 和 Glide)可以快速輕鬆地構建應用程序。另外,雲服務提供商(如 AWS Amplify 和 Firebase)提供了全面的工具
