visudo 内牛满面(无需root账号启停crs)-凯发app官方网站

凯发app官方网站-凯发k8官网下载客户端中心 | | 凯发app官方网站-凯发k8官网下载客户端中心
  • 博客访问: 3503103
  • 博文数量: 718
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7790
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(718)

文章存档

2024年(4)

2023年(74)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客
相关博文
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·
  • ·

分类: oracle

2020-02-03 17:29:41

由于管理严格,通常拿不到root权限,但是启停crs还得用root,需要申请,走流程,麻烦!
想了想,是不是有个sudo命令可以不用root密码了?

到底哪些命令需要呢?查了查发现这个地方有些提示:

可以对以下命令设置sudo:
/u01/app/12.1.0/grid/bin/crsctl
/u01/app/12.1.0/grid/bin/appvipcfg
/u01/app/12.1.0/grid/bin/srvctl
/u01/app/12.1.0/grid/bin/acfsroot
/u01/app/12.1.0/grid/bin/acfsload
/u01/app/orainventory/orainstroot.sh
/u01/app/12.1.0/grid/root.sh
/u01/app/oracle/product/12.1.0/dbhome_1/root.sh
/u01/app/12.1.0/grid/opatch/opatchauto

好的,我准备编辑一下,通过visudo命令一运行,猜我看到了什么:








往下拉









## allow root to run any commands anywhere

oracle    all=(all)       all    

grid    all=(all)       all    

root    all=(all)       all     

顿时内牛满面,都给你了还不知道,还申请个屁。

干他

[oracle@dbhost01 ~]$ ps -ef|grep d.bin
root       3060      1  0 jan05 ?        02:31:56 /u01/app/grid/11.2.0/bin/ohasd.bin reboot
grid       3466      1  0 jan05 ?        00:01:13 /u01/app/grid/11.2.0/bin/mdnsd.bin
grid       3505      1  0 jan05 ?        00:15:08 /u01/app/grid/11.2.0/bin/gpnpd.bin
grid       3545      1  0 jan05 ?        02:01:05 /u01/app/grid/11.2.0/bin/gipcd.bin
root       3557      1  1 jan05 ?        10:39:59 /u01/app/grid/11.2.0/bin/osysmond.bin
grid       3601      1  1 jan05 ?        07:39:50 /u01/app/grid/11.2.0/bin/ocssd.bin 
root       4372      1  0 jan05 ?        02:22:31 /u01/app/grid/11.2.0/bin/octssd.bin reboot
grid       4394      1  0 jan05 ?        01:29:54 /u01/app/grid/11.2.0/bin/evmd.bin
root       4716      1  0 jan05 ?        03:42:36 /u01/app/grid/11.2.0/bin/crsd.bin reboot
oracle    10116   9560  0 17:21 pts/0    00:00:00 grep d.bin
[oracle@dbhost01 ~]$ sudo /u01/app/grid/11.2.0/bin/crsctl stop crs
[sudo] password for oracle: 
crs-2791: starting shutdown of oracle high availability services-managed resources on 'dbhost01'
crs-2673: attempting to stop 'ora.crsd' on 'dbhost01'
crs-2790: starting shutdown of cluster ready services-managed resources on 'dbhost01'
crs-2673: attempting to stop 'ora.ocr_voting.dg' on 'dbhost01'
crs-2673: attempting to stop 'ora.registry.acfs' on 'dbhost01'
crs-2673: attempting to stop 'ora.arch.dg' on 'dbhost01'
crs-2673: attempting to stop 'ora.data.dg' on 'dbhost01'
crs-2673: attempting to stop 'ora.listener.lsnr' on 'dbhost01'
crs-2673: attempting to stop 'ora.listener_dg.lsnr' on 'dbhost01'
crs-2677: stop of 'ora.listener.lsnr' on 'dbhost01' succeeded
crs-2677: stop of 'ora.listener_dg.lsnr' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.dbhost01.vip' on 'dbhost01'
crs-2677: stop of 'ora.registry.acfs' on 'dbhost01' succeeded
crs-2677: stop of 'ora.arch.dg' on 'dbhost01' succeeded
crs-2677: stop of 'ora.data.dg' on 'dbhost01' succeeded
crs-2677: stop of 'ora.dbhost01.vip' on 'dbhost01' succeeded
crs-2672: attempting to start 'ora.dbhost01.vip' on 'dbhost02'
crs-2676: start of 'ora.dbhost01.vip' on 'dbhost02' succeeded
crs-2677: stop of 'ora.ocr_voting.dg' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.asm' on 'dbhost01'
crs-2677: stop of 'ora.asm' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.ons' on 'dbhost01'
crs-2677: stop of 'ora.ons' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.net1.network' on 'dbhost01'
crs-2677: stop of 'ora.net1.network' on 'dbhost01' succeeded
crs-2792: shutdown of cluster ready services-managed resources on 'dbhost01' has completed
crs-2677: stop of 'ora.crsd' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.crf' on 'dbhost01'
crs-2673: attempting to stop 'ora.ctssd' on 'dbhost01'
crs-2673: attempting to stop 'ora.evmd' on 'dbhost01'
crs-2673: attempting to stop 'ora.asm' on 'dbhost01'
crs-2673: attempting to stop 'ora.mdnsd' on 'dbhost01'
crs-2673: attempting to stop 'ora.drivers.acfs' on 'dbhost01'
crs-2677: stop of 'ora.crf' on 'dbhost01' succeeded
crs-2677: stop of 'ora.ctssd' on 'dbhost01' succeeded
crs-2677: stop of 'ora.mdnsd' on 'dbhost01' succeeded
crs-2677: stop of 'ora.evmd' on 'dbhost01' succeeded
crs-2677: stop of 'ora.drivers.acfs' on 'dbhost01' succeeded
crs-2677: stop of 'ora.asm' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.cluster_interconnect.haip' on 'dbhost01'
crs-2677: stop of 'ora.cluster_interconnect.haip' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.cssd' on 'dbhost01'
crs-2677: stop of 'ora.cssd' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.gipcd' on 'dbhost01'
crs-2677: stop of 'ora.gipcd' on 'dbhost01' succeeded
crs-2673: attempting to stop 'ora.gpnpd' on 'dbhost01'
crs-2677: stop of 'ora.gpnpd' on 'dbhost01' succeeded
crs-2793: shutdown of oracle high availability services-managed resources on 'dbhost01' has completed
crs-4133: oracle high availability services has been stopped.
[oracle@dbhost01 ~]$ ps -ef|grep d.bin
oracle    10797   9560  0 17:22 pts/0    00:00:00 grep d.bin
[oracle@dbhost01 ~]$
真香。

阅读(9500) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
")); function link(t){ var href= $(t).attr('href'); href ="?url=" encodeuricomponent(location.href); $(t).attr('href',href); //setcookie("returnouturl", location.href, 60, "/"); }
网站地图