* SUMMARY :: su - <user > -c <command > permission problem.
@ 2001-12-21 1:04 DYadav
0 siblings, 0 replies; only message in thread
From: DYadav @ 2001-12-21 1:04 UTC (permalink / raw)
To: tru64-unix-managers
This is a multipart message in MIME format.
--=_alternative 0005E6ACCA256B29_=
Content-Type: text/plain; charset="us-ascii"
thanks everyone .....I seams like I have to do some environment setting
manually. I'll try this after christmas ..thanks for the friends who
replied. Here is one of the solution I got.. ( "Davis, Alan" <Davis@tessco.com)
The typical reason that su'd scripts fail is because they don't get
the full environment of an interactive session.
Here's how I do it :
OENV=<path to user's env file>
APPUSER=<username of oracle acct>
FND_TOP=<path to top of binaries tree>
uSID=<oracle SID in uppercase>
/usr/bin/su - $APPUSER -c ". $OENV; \$FND_TOP/bin/start${uSID}mgr"
The important bit is the ". $OENV;" ahead of the command to execute. This
sources (in ksh) the users home environment file, ensuring that the script
gets the correct environment.
regards,
Dharmendra Yadav
---------------------------------------------------------------------------------
Oracle Database Administrator/Business Analyst
MELBOURNE DOCKLANDS AUTHORITY
Phone : +61 3 9628 4420 Mobile : +61 412 456 477
-----Original Message-----
From: DYadav@docklands.vic.gov.au [mailto:DYadav@docklands.vic.gov.au]
Sent: Thursday, December 20, 2001 6:05 PM
To: tru64-unix-managers@ornl.gov
Subject: su - <user > -c <command > permission problem.
>Hi wizkids,
> I want to add a scripts for Oracle Application and
Database
>on system (Tru64 , 5.1) shutdown/startup.
>These scripts works fine when I login to system as designated <oracle
>application user > user with no error.
>But when I added following line in script at /sbin/init.d/oraprod file
>( this is my linked file for statup & shutdown )
> su - <oracle user> -c <script path>
> they do not execute properly giving some permission error at certain
>part of the script.
--=_alternative 0005E6ACCA256B29_=
Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="sans-serif">thanks everyone .....I seams like I have to do some environment setting manually. I'll try this after christmas ..thanks for the friends who replied. Here is one of the solution I got.. ( </font><font size=1 face="sans-serif"><b>"Davis, Alan" <Davis@tessco.com</b></font><font size=2 face="sans-serif">)</font>
<br>
<br>
<br><font size=2 color=blue face="Courier New">The typical reason that su'd scripts fail is because they don't get </font>
<br><font size=2 color=blue face="Courier New">the full environment of an interactive session.</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 color=blue face="Courier New">Here's how I do it :</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 color=blue face="Courier New">OENV=<path to user's env file></font>
<br><font size=2 color=blue face="Courier New">APPUSER=<username of oracle acct></font>
<br><font size=2 color=blue face="Courier New">FND_TOP=<path to top of binaries tree></font>
<br><font size=2 color=blue face="Courier New">uSID=<oracle SID in uppercase></font>
<br><font size=2 color=blue face="Courier New">/usr/bin/su - $APPUSER -c ". $OENV; \$FND_TOP/bin/start${uSID}mgr"</font>
<br><font size=3 face="Times New Roman"> </font>
<br><font size=2 color=blue face="Courier New">The important bit is the ". $OENV;" ahead of the command to execute. This sources (in ksh) the users home environment file, ensuring that the script gets the correct environment.</font>
<br>
<br><font size=2 face="sans-serif">regards,<br>
<br>
Dharmendra Yadav<br>
---------------------------------------------------------------------------------<br>
Oracle Database Administrator/Business Analyst<br>
MELBOURNE DOCKLANDS AUTHORITY<br>
Phone : +61 3 9628 4420 Mobile : +61 412 456 477</font>
<br>
<br>
<br><font size=2 face="Tahoma">-----Original Message-----<b><br>
From:</b> DYadav@docklands.vic.gov.au [mailto:DYadav@docklands.vic.gov.au]<b><br>
Sent:</b> Thursday, December 20, 2001 6:05 PM<b><br>
To:</b> tru64-unix-managers@ornl.gov<b><br>
Subject:</b> su - <user > -c <command > permission problem.<br>
</font>
<br><font size=2 face="Courier New"><br>
>Hi wizkids,<br>
> I want to add a scripts for Oracle Application and Database <br>
>on system (Tru64 , 5.1) shutdown/startup. <br>
>These scripts works fine when I login to system as designated <oracle <br>
>application user > user with no error.<br>
>But when I added following line in script at /sbin/init.d/oraprod file <br>
>( this is my linked file for statup & shutdown ) <br>
> su - <oracle user> -c <script path><br>
> they do not execute properly giving some permission error at certain <br>
>part of the script. </font>
--=_alternative 0005E6ACCA256B29_=--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-12-21 1:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-21 1:04 SUMMARY :: su - <user > -c <command > permission problem DYadav
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox