Home » Infrastructure » Linux » Scripting newbie: Change user to Oracle in startup script? (Weblogic/Forms builder 10.3.4/11.1.1.4,)
Scripting newbie: Change user to Oracle in startup script? [message #522552] Mon, 12 September 2011 06:25 Go to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Hi!

Im trying to create a startup script for my WLS environment. The script will be run as ROOT, so I guess I have to change user in the beginning of the script.
su - oracle


Put how do I handle the password input?

Regards
H

Re: Scripting newbie: Change user to Oracle in startup script? [message #522562 is a reply to message #522552] Mon, 12 September 2011 06:52 Go to previous messageGo to next message
Michel Cadot
Messages: 65463
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you are root you don't need the password.

Regards
Michel
Re: Scripting newbie: Change user to Oracle in startup script? [message #522659 is a reply to message #522562] Tue, 13 September 2011 01:53 Go to previous messageGo to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Aha, I see, thanks!
Re: Scripting newbie: Change user to Oracle in startup script? [message #522728 is a reply to message #522659] Tue, 13 September 2011 06:31 Go to previous messageGo to next message
hristo
Messages: 258
Registered: May 2007
Senior Member
Hi!

Instead of starting a new thread, I continue in this one. Its the same script. Im trying to start OPMN (Weblogic Forms&Reports) using this:

nohup su $WLS_OWNER -c "$MIDDLEWARE_HOME/homedbtest/bin/./opmnctl startall" >/dev/null 2>/dev/null &


Does not work, I guess the script dont change to the Oracle user. At least that what the log files say. Any ideas (the previous issue dont need the .sh to be run by the Oracle user)?

Regards
H

[Updated on: Tue, 13 September 2011 06:53]

Report message to a moderator

Re: Scripting newbie: Change user to Oracle in startup script? [message #522738 is a reply to message #522728] Tue, 13 September 2011 07:05 Go to previous messageGo to next message
John Watson
Messages: 7366
Registered: January 2010
Location: Global Village
Senior Member
Perhaps you need

su - $WLS_OWNER

Re: Scripting newbie: Change user to Oracle in startup script? [message #522834 is a reply to message #522738] Wed, 14 September 2011 02:04 Go to previous message
hristo
Messages: 258
Registered: May 2007
Senior Member
John Watson wrote on Tue, 13 September 2011 07:05
Perhaps you need

su - $WLS_OWNER



Yes, that helped Smile
Previous Topic: not able to install oracle on centos [network configuration settings]
Next Topic: Oracle- 11G(linux.x64_11gR2) installation issue
Goto Forum:
  


Current Time: Thu Apr 26 21:33:47 CDT 2018

Total time taken to generate the page: 0.06865 seconds