Home » Infrastructure » Linux » ubuntu linux - ORA-01031: insufficient privileges
ubuntu linux - ORA-01031: insufficient privileges [message #501504] Tue, 29 March 2011 08:34 Go to next message
ianbram
Messages: 7
Registered: March 2011
Location: Cambridge
Junior Member
hi all

I have oracle xe running on ubuntu linux without any apparent problems until I try to connect like this
sqlplus / as sysdba at which point I get the ORA-01031: insufficient privileges message.

I have tried as root, as oracle (su oracle) and as a user who has membership in the dba group.

I have even set all the privileges on the oracle directory (chmod -R 777 /usr/lib/oracle) but all without success.

Would really appreciate some help on this as I am trying to configure the RMAN backup utility and need to set
XE to operate in archivelog mode.
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501508 is a reply to message #501504] Tue, 29 March 2011 08:44 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
which OS user owns oracle software directory?

post results from following OS commands as OS user oracle

id
env | sort
ls -ltr $ORACLE_HOME/dbs

use COPY & PASTE
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501510 is a reply to message #501508] Tue, 29 March 2011 08:52 Go to previous messageGo to next message
ianbram
Messages: 7
Registered: March 2011
Location: Cambridge
Junior Member
Here is the result:

oracle@ebase1:/$ id
uid=1001(oracle) gid=1001(dba) groups=1001(dba)
oracle@ebase1:/$ env | sort
HOME=/usr/lib/oracle/xe
LANG=en_GB.UTF-8
LOGNAME=oracle
LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:t w=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z =01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01; 31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;3 5:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01; 35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01; 35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35: *.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36: *.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
MAIL=/var/mail/oracle
OLDPWD=/root
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_SID=XE
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
PWD=/
SHELL=/bin/bash
SHLVL=2
SPEECHD_PORT=6560
SUDO_COMMAND=/bin/bash
SUDO_GID=1002
SUDO_UID=1002
SUDO_USER=ianbr
TERM=xterm
USERNAME=root
USER=oracle
_=/usr/bin/env
XDG_SESSION_COOKIE=6fecc60108157bfe557bb87f4d8b1d47-1301406400.943592-1370149727
oracle@ebase1:/$ ls -ltr $ORACLE_HOME/dbs
total 6924
-rwxrwxrwx 1 oracle dba 8385 2006-02-24 05:19 init.ora
-rwxrwxrwx 1 oracle dba 24 2011-02-24 07:10 lkXE
-rwxrwxrwx 1 oracle dba 7061504 2011-03-22 18:11 snapcf_XE.f
-rwxrwxrwx 1 oracle dba 1544 2011-03-28 02:45 hc_XE.dat
-rw-r----- 1 oracle dba 1536 2011-03-28 08:32 orapwXE
-rwxrwxrwx 1 oracle dba 2560 2011-03-28 08:57 spfileXE.ora
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501511 is a reply to message #501510] Tue, 29 March 2011 08:59 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
post results from following OS commands as OS user oracle as 4 different lines

sqlplus
/ as sysdba
SELECT * FROM V$VERSION;
EXIT


use COPY & PASTE
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501512 is a reply to message #501511] Tue, 29 March 2011 09:06 Go to previous messageGo to next message
ianbram
Messages: 7
Registered: March 2011
Location: Cambridge
Junior Member
Logged in as oracle:
oracle@ebase1:/$ whoami
oracle

This is where the problem kicks in:

oracle@ebase1:/$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 29 15:01:26 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501519 is a reply to message #501512] Tue, 29 March 2011 10:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
cat $ORACLE_HOME/network/admin/sqlnet.ora

Regards
Michel
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501520 is a reply to message #501519] Tue, 29 March 2011 10:43 Go to previous messageGo to next message
ianbram
Messages: 7
Registered: March 2011
Location: Cambridge
Junior Member
Hi Michel

Thanks for responding
This is what's in my sqlnet.ora

root@ebase1:~# cat $ORACLE_HOME/network/admin/sqlnet.ora
NAMES.DIRECTORY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin
SQLNET.AUTHENTICATION_SERVICES=(ALL)
LOG_DIRECTORY_CLIENT=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log
LOG_FILE_CLIENT=sqlnet_log
SQLNET.EXPIRE_TIME=0
TRACE_DIRECTORY_CLIENT=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/trace
TRACE_FILE_CLIENT=sqlnet_trc
TRACE_FILELEN_CLIENT=100
TRACE_FILENO_CLIENT=3
TRACE_LEVEL_CLIENT=OFF
TRACE_TIMESTAMP_CLIENT=ON
TRACE_UNIQUE_CLIENT=ON
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501521 is a reply to message #501520] Tue, 29 March 2011 10:50 Go to previous messageGo to next message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
I don't know if that's the cause, since I never used anything sudo related, but this :
SUDO_COMMAND=/bin/bash
SUDO_GID=1002
SUDO_UID=1002
SUDO_USER=ianbr
...
USERNAME=root
...


Could mean you are not *really* oracle as far as oracle is concerned. Can you try logging in as oracle from the start.
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501522 is a reply to message #501521] Tue, 29 March 2011 10:56 Go to previous messageGo to next message
ianbram
Messages: 7
Registered: March 2011
Location: Cambridge
Junior Member
Hi Thomas

Nope still get the same error when trying to logon without a user or password ie: sqlplus / as sysdba

root@ebase1:~# sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 29 16:52:08 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501531 is a reply to message #501504] Tue, 29 March 2011 13:34 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
This may have been a big mistake
Quote:
I have even set all the privileges on the oracle directory (chmod -R 777 /usr/lib/oracle) but all without success.
I think you have lost the setuid modes that are necessary, and made your Oracle Home useless. Better install it again.
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501590 is a reply to message #501531] Wed, 30 March 2011 01:08 Go to previous messageGo to next message
ianbram
Messages: 7
Registered: March 2011
Location: Cambridge
Junior Member
Thanks John - I was coming to that conclusion myself
Although I would still like to know why this error condition occurred after the initial install
Re: ubuntu linux - ORA-01031: insufficient privileges [message #501763 is a reply to message #501590] Thu, 31 March 2011 04:41 Go to previous messageGo to next message
ianbram
Messages: 7
Registered: March 2011
Location: Cambridge
Junior Member
General information

I have managed to get the answer to this issue via the Oracle OTN Discussions Forums and thought I would share it here in case others experience the same problem.

This is the message I received from an Oracle DBA

$> sqlplus /nolog

SQL> conn / as sysdba --> won't work in XE. you have to explicitly say SQL> conn sys as sysdba;

I don't know why, but in XE it is like that.
Re: ubuntu linux - ORA-01031: insufficient privileges [message #593580 is a reply to message #501504] Sun, 18 August 2013 22:17 Go to previous messageGo to next message
mursi_legitimate
Messages: 1
Registered: August 2013
Junior Member

add the user currently logged in, to the dba group with the following command:

sudo usermod -a -G dba admin

#i found this works
Re: ubuntu linux - ORA-01031: insufficient privileges [message #596874 is a reply to message #593580] Fri, 27 September 2013 00:06 Go to previous messageGo to next message
8939513598$
Messages: 103
Registered: July 2013
Location: chennai
Senior Member
for executing command as sudo user, an entry to be done on /etc/sudoers file, what is the format(kind of entires) to enter in the file? i understood that instead of root user executing commands , sudo command should be used,
Re: ubuntu linux - ORA-01031: insufficient privileges [message #596877 is a reply to message #596874] Fri, 27 September 2013 00:16 Go to previous messageGo to next message
8939513598$
Messages: 103
Registered: July 2013
Location: chennai
Senior Member
I tried to learn the command, it's showing error like this, look at the following,

"
[oracle@oraclehost sbin]$ sudo usermod --help
[sudo] password for oracle:
oracle is not in the sudoers file. This incident will be reported. "

how to put the entry in the file ?
Re: ubuntu linux - ORA-01031: insufficient privileges [message #596921 is a reply to message #596877] Fri, 27 September 2013 08:58 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
man visudo
Previous Topic: what is the latest RHEL version that supports Oracle 9i
Next Topic: using sudo command
Goto Forum:
  


Current Time: Thu Mar 28 21:18:51 CDT 2024