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 Magni <fabrizio.magni_at_mycontinent.com>
Date: Sun, 02 Oct 2005 15:56:54 +0200
Message-ID: <433fe724$0$6348$4fafbaef@reader2.news.tin.it>


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.

-- 
Fabrizio Magni

fabrizio.magni_at_mycontinent.com

replace mycontinent with europe
Received on Sun Oct 02 2005 - 08:56:54 CDT

Original text of this message

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