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: ORA-01031: insufficient privileges

Re: ORA-01031: insufficient privileges

From: joel garry <joel-garry_at_home.com>
Date: 22 Feb 2007 13:24:14 -0800
Message-ID: <1172179454.740045.156660@p10g2000cwp.googlegroups.com>


On Feb 22, 12:17 pm, "lazyboy..._at_yahoo.com" <lazyboy..._at_yahoo.com> wrote:
> Hi All,
>
> > What UNIX account owns the installation?
>
> It should be sysdba:oracle, but it's changed now & pls see the below
> for explanation.
>
> > Is it the same as when you type whoami?
>
> No, it's not the same, but does it matter?
>
> # su - sysdba
> Sun Microsystems Inc. SunOS 5.10 Generic January 2005
> nch-solarishp ~ [ora10gdb] $ who am i
> root pts/3 Feb 22 11:32 (itd123456.xyz.com)
>
> > Are ORACLE_HOME and ORACLE_SID set correctly?
>
> Yes, they are correct.
>
> $ echo $ORACLE_HOME
> /oraclesw/product/10.2.0
>
> $ echo $ORACLE_SID
> ora10gdb
>
> > Are there other Oracle homes on the server?
>
> No
>
> > And finally .... where did this come from?
> > uid=1001(sysdba) gid=101(oracle)
>
> That's when I login as user sysdba.
>
> > SYSDBA is a role not a user
> > You need a gid = DBA and a gid = OINSTALL
> > and a UID = oracle for the default.
>
> I normally create a user=oracle & group=oinstall and that I've never
> encountered a problem when connect / as sysdba. I just decided naming
> an acct a little bit different this time & I encounter it. I already
> recursively changed userid=dba & group=oinstall to own /oraclesw dir &
> all of its sub-directories; however, I'm not be able to conn / as
> sysdba.
>
> # su - dba
> Sun Microsystems Inc. SunOS 5.10 Generic January 2005
> nch-solarishp ~ [ora10gdb] $ who am i
> root pts/3 Feb 22 11:32 (itd123456.xyz.net)
> $ echo $ORACLE_HOME
> /oraclesw/product/10.2.0
> $ echo $ORACLE_SID
> ora10gdb
> $ ls -la
> total 28
> drwxr-xr-x 9 dba oinstall 512 Feb 20 17:04 .
> drwxr-xr-x 34 root root 1024 Feb 20 14:43 ..
> -rw------- 1 dba oinstall 2704 Feb 22 12:08 .bash_history
> -rw-r--r-- 1 dba oinstall 502 Feb 20 14:32 .profile
> drwxr-x--- 3 dba oinstall 512 Feb 20 14:38 admin
> -rw-r--r-- 1 dba oinstall 34 Feb 20 17:23 afiedt.buf
> drwxr-xr-x 3 dba oinstall 512 Feb 20 13:14 binary
> drwxr-x--- 3 dba oinstall 512 Feb 20 14:39
> flash_recovery_area
> drwxr-x--- 2 dba oinstall 512 Feb 20 15:56 ora10gdb
> drwxr-x--- 3 dba oinstall 512 Feb 20 14:38 oradata
> drwxrwx--- 6 dba oinstall 512 Feb 20 14:38 oraInventory
> drwxrwx--- 3 dba oinstall 512 Feb 20 14:34 product
> $ ls -l ${ORACLE_HOME}/bin/oracle
> -rwsr-s--x 1 dba oinstall 133001712 Feb 20 14:37 /oraclesw/
> product/10.2.0/bin/oracle
> $ sqlplus /nolog
>
> SQL*Plus: Release 10.2.0.1.0 - Production on Thu Feb 22 12:10:31 2007
>
> Copyright (c) 1982, 2005, Oracle. All rights reserved.
>
> SQL> conn / as sysdba
> ERROR:
> ORA-01031: insufficient privileges

I'm not sure I've followed all of this, but it sounds like you started the db and didn't shut it down before changing the ownership, leaving active memory structures that you no longer have ability to remove. You may want to do an ipcs and ipcrm as root to display and remove these. Also, look for lck or other strange files in $ORACLE_HOME/ dbs. Also, have you a password file? That might need to be rebuilt.

If whoami says you are root, you may be looking at some builtin security features (I don't know if that applies to 10g or not, and I don't remember all the caveats since I don't do that). Login directly as the oracle owner.

jg

--
@home.com is bogus.
I noticed.  Couldn't hardly get to metalink.
http://www.cnn.com/2007/TECH/internet/02/06/internet.attacks.ap/index.html
Received on Thu Feb 22 2007 - 15:24:14 CST

Original text of this message

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