?
Solved

linux-orace_insuffient priv

Posted on 2011-05-02
13
Medium Priority
?
309 Views
Last Modified: 2012-05-11
mathew@mathew-Inspiron-1501:/$ export ORACLE_SID=orcl
mathew@mathew-Inspiron-1501:/$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
mathew@mathew-Inspiron-1501:/$ export PATH=$PATH:$ORACLE_HOME/bin
mathew@mathew-Inspiron-1501:/$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon May 2 11:52:00 2011

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

SQL> conn / as sysdba
ERROR:
ORA-01031: insufficient privileges


0
Comment
Question by:nobleit
  • 8
  • 5
13 Comments
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35507497
Make sure the user you are logged into the server with is in the dba OS group.

From a command prompt: id
0
 

Author Comment

by:nobleit
ID: 35507540
mathew@mathew-Inspiron-1501:/$ id
uid=1000(mathew) gid=1000(mathew) groups=1000(mathew),4(adm),20(dialout),24(cdrom),46(plugdev),111(lpadmin),119(admin),122(sambashare)
mathew@mathew-Inspiron-1501:/$
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35507559
I mentioned that in the other question.

See under groups:  There is no dba group listed.

The user mathew needs to be in the OS dba group.

http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 

Author Comment

by:nobleit
ID: 35507625
mathew@mathew-Inspiron-1501:/$ useradd -G mathew sysdba
useradd: cannot lock /etc/passwd; try again later.
mathew@mathew-Inspiron-1501:/$
0
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 2000 total points
ID: 35507702
The dba group is an OS group.  SYSDBA is an Oracle group.  Two different things.

You have the command backwards.  You also need to be root to do this.

useradd -G dba mathew


0
 

Author Comment

by:nobleit
ID: 35508519
mathew@mathew-Inspiron-1501:~$ useradd -G dba mathew
useradd: user 'mathew' already exists
mathew@mathew-Inspiron-1501:~$ useradd -G dba mathew
useradd: user 'mathew' already exists
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35508614
You should look to the man pages/docs for your specific distribution of Linux.

What Linux provider are you using?

I guess Ubuntu uses:
usermod -a -G dba mathew

http://nixcraft.com/ubuntu-debian/8555-ubuntu-linux-add-user-group.html

Personally I would just vi /etc/group and add the user to the group but if you aren't comfortable with *nix, I would stay away from manually editing system files.
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35508630
I guess usermod is also a general command.  I found it referenced here as well:
http://linuxconfig.org/linux-add-user-to-group

0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35508668
Since you are active can I ask why you are not responding to my requests for clarification on some of your closed questions?
0
 

Author Comment

by:nobleit
ID: 35509355
mathew@mathew-Inspiron-1501:~$ usermod -a -G dba mathew
Command 'usermod' is available in '/usr/sbin/usermod'
The command could not be located because '/usr/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
usermod: command not found
mathew@mathew-Inspiron-1501:~$
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35509388
What does the man pages/docs say?  I don't know what Linux you are running do I'm throwing out links.

Are you root?  Is /usr/bin in the PATH?  Is that even the right program for your version?

The answer to your question in mathew needs to be in the OS dba group.

Are you comfortable with using vi on /etc/group?
0
 

Author Comment

by:nobleit
ID: 35510730
only thing I want is to convert
mathew@mathew-Inspiron-1501:/$ sqlplus /nolog

the first part mathew to oracle
like this

oracle@mathew-Inspiron-1501:/$ sqlplus /nolog
before it worked fine when it was oracle


0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35512283
OK, "sqlplus /nolog" and "sqlplus / as sysdba" are two different things.

"sqlplus /nolog"  just runs sqlplus without prompting for a username and password.  I refer you to the online docs:

http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_three.htm#sthref144

"sqlplus / as sysdba" runs sqlplus and passes the username and password in on the command line.  "/ as sysdba" is a shortcut to connecting as the SYS user.

To connect as "/ as sysdba", the OS user needs to be in the OS dba group.

Until the "id" command shows the "dba" Unix group, it will not work.



0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question