Home » RDBMS Server » Security » ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't work
icon5.gif  ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't work [message #140009] Fri, 30 September 2005 08:33 Go to next message
epicuro
Messages: 2
Registered: September 2005
Location: A secret place!
Junior Member
Dear Oracle users,

I've installed Oracle 9.2.0 on a Fedora Core 1 machine, and I'm having problems using the sysdba account. Could someone please give me some advice ?

I installed Oracle under the oracle user, that it's under the dba group.

When I installed, I didn't chose the option to create a database. I just installed the software because I wanted to create the database later manually (not using dbca).

Now, as user oracle :

-bash-2.05b$ id
uid=7191(oracle) gid=1101(dba) groups=1101(dba)

-bash-2.05b$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Fri Sep 30 15:23:59 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL>

And with root user :

[root@asterix root]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),1101(dba)

[root@asterix root]# sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Fri Sep 30 15:24:24 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:


Could someone please help me ? I can't see what am I doing wrong. root is under dba group so oracle user does.

Thanks.

Cheers,
Mark

[Updated on: Fri, 30 September 2005 08:35]

Report message to a moderator

Re: ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't [message #140046 is a reply to message #140009] Fri, 30 September 2005 10:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Before even looking into a solution,
may i ask why you need this?
Root does not need to login into oracle as a Sysdba. Never.
There are some security flaws in this model.
Root can always just 'su - oracle' to login as oracle and do the intended business.

[Updated on: Fri, 30 September 2005 10:24]

Report message to a moderator

Re: ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't [message #140052 is a reply to message #140046] Fri, 30 September 2005 10:38 Go to previous messageGo to next message
epicuro
Messages: 2
Registered: September 2005
Location: A secret place!
Junior Member
Dear Mahesh,

Thanks for your prompt reply.

I need this because I'm new to oracle and I just wanted to see how the "connect / as sysdba" works.

Quote:

Root does not need to login into oracle as a Sysdba


I don't want to use it on production systems. I'm just learning. In the "Oracle9i Database Administrator's Guide Release 2 (9.2)" manual, it doesn't say anything about root not being able to connect as sysdba.

What I want to know is why this doesn't work. Is there a hardcoded function in sqlplus that doesn't let you connect as sysdba if your userid is 0 ?

Thanks.
Re: ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't [message #140054 is a reply to message #140052] Fri, 30 September 2005 11:01 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
'dba' should be a primary group.
oracle@mutation#su -
Password:
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
# bash
bash-2.03# usermod -g dba root
bash-2.03# id
uid=0(root) gid=101(dba)
bash-2.03# export ORACLE_HOME=/u01/app/oracle/product/9.2.0
bash-2.03# export PATH=$PATH:$ORACLE_HOME/bin
bash-2.03# export ORACLE_SID=mutation
bash-2.03# sqlplus '/as sysdba'
                                                                                                                                                             
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Sep 30 11:59:56 2005
                                                                                                                                                             
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
                                                                                                                                                             
                                                                                                                                                             
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
                                                                                                                                                             
sys@9i > select name from v$database;
                                                                                                                                                             
NAME
---------
MUTATION

icon14.gif  Re: ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't [message #142283 is a reply to message #140054] Fri, 14 October 2005 01:28 Go to previous messageGo to next message
y_krishnareddy
Messages: 1
Registered: October 2005
Junior Member
Befor u install oracle on unix mechines .........Your have to create group as DBA and user as ORACLE.....Once your installation has been finished successfully go for root and type
su -oracle....Than it will go for oracle after that issue this command

sqlplus /nolog
connect /as sysdba

Your problem will sortout...


Regards
Krishna
Re: ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't [message #149428 is a reply to message #140009] Thu, 01 December 2005 14:26 Go to previous messageGo to next message
nmacdannald
Messages: 460
Registered: July 2005
Location: Stockton, California - US...
Senior Member
You really should have the .profile of the Oracle Software Owner set to see only that database. Root is not allowed to install and you should not access the databse as root. Here is my .profile:

>cat .profile
MAIL=/usr/mail/${LOGNAME:?}
set umask 022
#
###
#set terminal charistics
#
stty istrip
stty columns 80
stty rows 36
set -o emacs
#DISPLAY=solarsystem:0.0
#export DISPLAY
#
###
ORACLE_BASE=/u04/app/oracle
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.1.0.2
export ORACLE_HOME
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/ccs/lib:/usr/dt/lib:/usr/lib:$ORACLE_HOME/jdbc/lib$ORACLE_HOME/lib32
export LD_LIBRARY_PATH
TMPDIR=/var/tmp
export TMPDIR
ORACLE_SID=os2t
export ORACLE_SID
ORACLE_TERM=vt220
export ORACLE_TERM
CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
export CLASSPATH
#ORA_NLS=AMERICAN_AMERICA.US7ASCII
#export ORA_NLS
#SQLPATH=$ORACLE_HOME/
#export SQLPATH
#
###
# Set environmentals for util
###
UNZ_DIR=$ORACLE_HOME/oraunzip
export UNZ_DIR
#
###
# Add to the PATH env
### Original Path...
PATH=/sbin:/usr/sbin:$ORACLE_HOME:$ORACLE_HOME/bin:/export/home/orat10:/export/home/scripts:/opt/csw/bin:/bin:/usr/sbin:/usr/bin:/usr /ccs/bin:/usr/ucb:/etc:/usr/lib/lp/postscript:/usr/bin/unzip:/usr/local/bin:/u04/oradata/os2t/101:/usr/openwin/bin:/usr/gnome:/opt/sf w/bin/:/usr/dt/bin/:u05/oracle/os2t/budir
export PATH
ORAENV_ASK=NO
. /export/home/orat10/scripts/orafuncds
. /export/home/orat10/scripts/don-funcds
MANPATH=$MANPATH:/usr/share/man
export MANPATH
PS1="[`hostname`:$LOGNAME]$"
date
who -u
stty erase ^?
set -o vi

PS1="
`whoami`*\${ORACLE_SID}-\${PWD}
>"

export EDITOR=vi

This runs whenever you log into orat10(software owner) using ksh.
Re: ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't [message #150472 is a reply to message #140009] Thu, 08 December 2005 00:44 Go to previous messageGo to next message
zkej27
Messages: 2
Registered: December 2005
Location: Singapore
Junior Member
you may able to do this by making "dba" as the primary group for "root" but the impact will be unknown.

"root" is the superuser and have all the authority to emulate all users in the server.

hope this helps.

Regards
Re: ORA-01031:insufficient privileges,I already checked the other threads about this, still doesn't [message #467749 is a reply to message #150472] Tue, 27 July 2010 01:50 Go to previous message
mayanksi
Messages: 1
Registered: July 2010
Junior Member
I have sucessfully overcome this error Insuffcient Permission
Below is the solution

ASMM10 /oravl01/oracle > orasql
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jul 27 11:58:08 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
ERROR:
ORA-01031: insufficient privileges

ASMM10 /etc>id
uid=269(oracle) gid=102

orapwd file=orapwAMCINST2 password=manager entries=100 force=y

Group should be 201
ASMM10 /oravl01/oracle > cat /etc/group | grep dba
dba::201:

ASMM10 /etc > cat /etc/passwd | grep oracle
oracle:x:269:201:Shripad ,36133,shripadg,GEN,ASMS-DEV,,=idm=,:/oravl01/oracle:/usr/bin/tcsh

After fixing the DBA group id
ASMM10 /etc > id
uid=269(oracle) gid=201(dba)

ASMM10 /oravl01/oracle > orasql
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jul 27 12:10:22 2010
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning and Data Mining options

SQL>
Previous Topic: Disconnect from oracle DB.
Next Topic: User security violations
Goto Forum:
  


Current Time: Thu Mar 28 12:49:14 CDT 2024