Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Automating Database Startup and Shutdown on Tru64 os V5.1A

Re: Automating Database Startup and Shutdown on Tru64 os V5.1A

From: fabrizio <fabrizio.imperio_at_alice.it>
Date: Sun, 2 Oct 2005 19:09:17 +0200
Message-ID: <43401446$0$32455$4fafbaef@reader1.news.tin.it>


"Fabrizio Magni" ha scritto
> fabrizio wrote:
>> I'll try to change the ownership to the /etc/oracle file, I'll assign it
>> oracle:oinstall ownership.
>> But I tryed to launch the script as root user and always it showed me
>> permission deined;
>> this is the bad surprise you was talking about?
>>
>
> No, not really.
>
> If you launch the script as root and you don't give the right parameters
> ("start ORA_DB") then this part of the code is execute:
>
> >> if [ ! "$2" = "ORA_DB" ] ; then
> >> rsh $HOST -l $ORACLE /sbin/init.d/oracle $1 ORA_DB
> >> exit
> >> fi
>
> and the script is run again, via rsh, with the right parameters but the
> wrong user producing, in my opinion, the "permission denied".
>
> To give the root ownership to /sbin/init.d/oracle is not wrong... but the
> inside should be changed.
>
> Why using rsh?
> The command "su - oracle" can be a better replace.
>
> Example:
>
> su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
>
> Note: before the lsnrctl command you may need to set the env.
>
> su - $ORACLE_OWNER -c "<set your env>; $ORACLE_HOME/bin/lsnrctl start"
>
> In this way your script is owned by root and can be execute only by the
> superuser but every command is performed as the oracle user.
>
> Even more: shut the rsh down. It is a security hole and can be replaced by
> ssh.

Ok tomorrow I will try to follow your suggestion, I'll tell you the result.
Thanks so much again.
Fabrizio Received on Sun Oct 02 2005 - 12:09:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US