EBS克隆后彻底清除生产密码

当我们对EBS生产环境克隆出一套测试环境,怎么清楚生产上所有的密码认证呢?

确保应用层的进程都停下来了,数据库是OPEN的。

第一步,清除生产密码  Step1 - Clear All Credentials

su - ora

如果还没克隆,那么在<RDBMS_ORACLE_HOME>下还没生成<SID>.env文件,那么至少要有这些环境变量:

export ORACLE_SID=<sid>

export ORACLE_HOME=<db-oraclehome>

export PATH=$ORACLE_HOME/bin

unset TWO_TASK

sqlplus ‘as sysdba‘<<EOF

REM Clear all production credentials from the cloned database

update SYS.user$ set

password = translate(password,‘0123456789ABCDEF‘,‘0000000000000000‘)

where type#=1 and length(password) = 16

/

update APPLSYS.FND_ORACLE_USERID set

ENCRYPTED_ORACLE_PASSWORD=‘INVALID‘

/

update APPLSYS.FND_USER set

ENCRYPTED_FOUNDATION_PASSWORD=‘INVALID‘,

ENCRYPTED_USER_PASSWORD=‘INVALID‘

/

commit;

EOF

第二步,重新建立密码认证,确保期间没有报错,并且最后两个输出都是Y。Step 2 - Re-establish Bootstrap Credentials

The database at the moment has no credentials. Now log on as "SYS" with operation system authentication. This will allow you to establish new credentials.

su - ora

sqlplus ‘/as sysdba‘<<EOF

REM Set a new password for a few initial database users

alter user SYS identified by CLONE;

alter user SYSTEM identified by CLONE;

alter user APPLSYSPUB identified by CLONE;

alter user APPLSYS identified by CLONE;

alter user APPS identified by CLONE;

update APPLSYS.FND_ORACLE_USERID set

 ENCRYPTED_ORACLE_PASSWORD=‘CLONE‘

 where ORACLE_USERNAME = ‘APPLSYSPUB‘

/

REM Provide boot-strap info for FNDCPASS...

update APPLSYS.FND_ORACLE_USERID set

 ENCRYPTED_ORACLE_PASSWORD=‘ZG‘ ||

 ‘B27F16B88242CE980EF07605EF528F9391899B09552FD89FD‘ ||

 ‘FF43E4DDFCE3972322A41FBB4DDC26DDA46A446582307D412‘

 where ORACLE_USERNAME = ‘APPLSYS‘

/

update APPLSYS.FND_ORACLE_USERID set

 ENCRYPTED_ORACLE_PASSWORD=‘ZG‘ ||

 ‘6CC0BB082FF7E0078859960E852F8D123C487C024C825C0F9‘ ||

 ‘B1D0863422026EA41A6B2B5702E2299B4AC19E6C1C23333F0‘

 where ORACLE_USERNAME = ‘APPS‘

/

commit;

conn APPS/CLONE

select APPS.fnd_web_sec.change_guest_password( ‘CLONE‘, ‘CLONE‘ ) "RES" from dual;

commit;

select APPS.fnd_web_sec.change_password(‘SYSADMIN‘,‘CLONE‘) "RES" from dual;

commit;

EOF

第三步,产生修改其余用户的脚本,假如不想修改其他用户的密码,可以不做。

ATTENTION :

It has been identified, that some Customers running into an error for the SQL PLus command

select APPS.fnd_web_sec.change_password(‘SYSADMIN‘,‘CLONE‘) "RES" from dual;

In this case, please check Note 1350776.1 for the solution, before your are going ahead with the next steps !

Now we have completed establishing a set of bootstrap EBS credentials in the database.

现在我们已经完成一系列的在数据库中的EBS引导认证。

Step 3 - Prepare Scripts for Setting Additional Passwords

su - ora

sqlplus ‘/as sysdba‘ <<EOF

REM Prepare SQL and SHELL scripts to set more passwords later

spool step3.lst

REM Generate a sql script to set password for db users not managed with EBS

select ‘alter user "‘|| USERNAME ||‘" identified by CLONE; ‘

from SYS.DBA_USERS

where USERNAME not in (select ORACLE_USERNAME from APPLSYS.FND_ORACLE_USERID)

and USERNAME not in (‘SYS‘,‘SYSTEM‘);

REM Generate a shell script to set password for all base product schemas

select ‘FNDCPASS apps/clone 0 Y system/clone ALLORACLE clone‘ from dual;

REM Generate a shell script to set password for non-EBS db users managed with EBS

select ‘FNDCPASS apps/clone 0 Y system/clone ORACLE "‘ ||

replace(ORACLE_USERNAME,‘$‘,‘\$‘) || ‘" clone‘

from APPLSYS.FND_ORACLE_USERID

where READ_ONLY_FLAG = ‘X‘

and ORACLE_USERNAME in (select USERNAME from SYS.DBA_USERS);

REM Generate a shell script to set password for APPS/APPLSYS/APPM_mrc db users

select ‘FNDCPASS apps/clone 0 Y system/clone SYSTEM APPLSYS clone‘ from dual;

REM Generate scripts for steps 4 & 5

spool off

HOST grep ‘^alter user ‘ step3.lst > dbusers4.sql

HOST grep ‘^FNDCPASS ‘ step3.lst > dbusers5.sh

exit

EOF

第四步,跑第3步产生的脚本dbusers4.sql

su - ora

sqlplus ‘/as sysdba‘<<EOF

start dbusers4.sql

exit

EOF

第五步,Step 5 - Assign New Passwords to All Schemas Managed with EBS

在应用层,用appl用户跑第3步做出的脚本,dbusers5.sh

This step uses the "FNDCPASS" command to set the passwords for all the EBS managed schemas and all the base product schemas. The "FNDCPASS" must be run from an application tier node.(Any node with an APPL_TOP file
system.)

You will need to locate and copy the "dbusers5.sh" script from the directory where it was created in Step 3. Again, as with any dynamcially generated scripts that you run on your system, you should review the contents
of the file before running it.

To verify that you have assigned passwords to all the database users, run the following query and ensure that it does not return any rows:

select USERNAME,PASSWORD from DBA_USERS where PASSWORD=‘0000000000000000‘;

为了验证所有数据库用户的密码都被改过来了,可以用

select USERNAME,PASSWORD from DBA_USERS where PASSWORD=‘0000000000000000‘;

当然,如果你不喜欢用clone作为密码,可以登陆form的define user或者用fndcpass工具再将密码改过来。

su - appl

FNDCPASS apps/clone 0 Y system/clone USER <username> <password>

第六步,在你真正启动应用层进程前,还要做这些配置,然后执行autoconfig。 

[[email protected] erpp1]# su - appl

[[email protected] ~]$ echo $GWYUID

APPLSYSPUB/PUB

[[email protected] ~]$

[[email protected] ~]$ echo $CONTEXT_FILE

/u01/erpp1/inst/apps/erpp1_erpp1/appl/admin/erpp1_erpp1.xml

[[email protected] ~]$ vi $CONTEXT_FILE

查找APPLSYSPUB,将后面的密码PUB改为CLONE,保存退出。

应用层执行dbconfig

[[email protected] ~]$ cd $ADMIN_SCRIPTS_HOME

[[email protected] scripts]$ pwd

/u01/erpp1/inst/apps/erpp1_erpp1/admin/scripts

[[email protected] scripts]$ ls

adalnctl.sh adautocfg.sh adexecsql.pl adformsctl.sh adoacorectl.sh adopmnctl.sh adstpall.sh gsmstart.sh java.sh msc mwactlwrpr.sh

adapcctl.sh adcmctl.sh adforms-c4wsctl.sh adformsrvctl.sh adoafmctl.sh adpreclone.pl adstrtal.sh ieo jtffmctl.sh mwactl.sh

[[email protected] scripts]$ sh adautocfg.sh

重新加载环境变量

[[email protected] erpp1]# su - appl

[[email protected] ~]$ echo $GWYUID

APPLSYSPUB/CLONE

[[email protected] ~]$

停应用再启。

参考文档:419475.1 《Removing Credentials
from a Cloned EBS Production Database》

EBS克隆后彻底清除生产密码

时间: 2024-08-13 11:00:18

EBS克隆后彻底清除生产密码的相关文章

EBS克隆后无法访问主页404,500or400any way

新主机克隆ebs后,启动应用没有错误显示status 0,但是主页无法显示,查看apache日志: 在外国的博客中找到如下解决方案: While starting Apache after clone we faced the following error. [[email protected] scripts]$ sh adapcctl.sh startYou are running adapcctl.sh version 120.7.12010000.2Starting OPMN mana

破解EBS R12应用和数据库用户密码

1,如果你有某个EBS环境APPS用户密码,可以破解应用用户的密码 参考:Oracle EBS R12下如何破解用户密码 2,如果没有APPS用户密码,还想破解该环境A密码.要看"运气"了,如果有相应的Clone环境B,EBS DBA还没有修改$CONTEXT_FILE内容,并且具有环境A的数据查询权限,可以破解APPS密码 参考:Oracle EBS R12 - 利用PLSQL取得/破解apps密码和EBS中的用户密码 1)在环境B中创建上文中的包,在环境A中查询GUEST用户加密后

Oracle EBS登陆后,直接打开某个特定Form/Page

http://blog.csdn.net/pan_tian/article/details/8169339 有一个小技巧,Oracle EBS登陆后可以绕过职责和功能的选择过程,就可以直接打开某个特定的Form,这样整个的登陆过程会更快. 方法:Oracle Application Home Page > Preferences > Start Page,输入起始的'Responsibility'和'Page',Apply之后,重新登陆,就可以绕过职责和功能的选择过程,直接打开某个特定的For

安装mysql后无法找到临时密码的解决方案

安装mysql后无法找到临时密码的解决方案 一.环境 系统:CentOS7mysql:5.7.20 二.解决步骤 step1:修改/etc/my.cnf添加: skip-grant-tables step2:重启mysql service mysqld restart step3:登录 mysql -u root #此时不需要密码,可以直接登录 step4:修改密码 update mysql.user set password=password('root') where user='root'

vmware虚拟机克隆后eth0无法启动的解决方法

今天早上准备克隆一台虚拟机做实验,结果克隆后发现使用 ifconfig 只显示lo,并没有找到eth0 使用ifconfig eth0 up 结果:unknown interface:No such device 查看 /etc/sysconfig/network-scripts/ifcfg-eth0 发现并没有什么不正常的地方. 被克隆的机器上执行ifconfig命令,发现两台机的MAC地址是相同的. 于是决定修改eth0的MAC地址,直接编辑/etc/sysconfig/network-sc

虚拟机克隆后eth0网卡变成eth1网卡并且IP地址消失问题解决

1.问题情况 在vmware中克隆一个虚拟机后,新的虚拟机网络无法使用,并用原操作系统中的网卡eth0在克隆出来的新系统中,网卡号变成了eth1,并且IP地址也丢失了,网络不可正常使用. 2.环境情况 原机器名称 克隆后目标主机 机器名称 别名 机器名称 别名 ol6-single A机器 ol6_weblogic_1 B机器 3.克隆过程 将A机器关闭,在Vmware控制台上,右击虚拟机A机器(ol6-single),点击"clone"-"下一步",按提示一步步完

VMWare Workstation 10.0 虚拟机克隆后的网卡配置

vmware 克隆 centos 修改 linux mac 地址 Device eth0 does not seem to be present, delaying initialization 故障背景: 在vmware workstation中了完全克隆了一个已经存在的centos的虚拟机,启动之后发现网卡没有启动.于是重启一下network服务,发现提示错误信息"Device eth0 does not seem to be present, delaying initialization

解决CentOS虚拟机克隆后无法上网(网卡信息不一致)的问题

一.问题描述 虚拟机克隆后,由于网卡信息不一致的问题,导致不能上网或者执行"sercice network restart"命令失败 [[email protected] 桌面]# ifconfig //查看当前网卡信息 [[email protected] 桌面]# cd /etc/sysconfig/network-scripts //进入网卡配置文件目录 [[email protected] network-scripts]# ls //查看网卡配置文件中的网卡信息 二.原因分析

虚拟机下Linux虚拟机克隆后导致克隆体不能上网问题!

虚拟机下Linux虚拟机克隆后导致克隆体不能上网问题! 由于虚拟机克隆导致系统保留原来网卡信息和克隆后的新虚拟网卡发生重复,因为系统配置文件只识别eth0这张虚拟网卡,而ifconfig -a查看的信息上面显示虚拟网卡为eth1,而又克隆体上的虚拟网卡eth0(/etc/sysconfig/networkscripts/ifcfg-eth0)上的设置是母体的虚拟机设置,所以导致系统不匹配该网卡信息,从而不能上网. 解决方法: 1.修改系统文件: vi /etc/udev/rules.d/70-p