can't connect as sys in added user [message #476321] |
Wed, 22 September 2010 10:29 |
PanamDimas
Messages: 63 Registered: April 2010 Location: Maryland . U.S.A
|
Member |
|
|
Hello,
I added a user to Linux RHEL5.
I was able to login a d user but could not log in as sysdba.
this is what happened:
I did this as root user:
$ useradd m g dba user2
$ passwd user2
$ New UNIX password: 888888
Retype new UNIX password: 888888
passwd: all authentication tokens updated successfully
I logged out as root and logged in user2
$ export ORACLE_SID=user2db
$ echo $ORACLE_SID
user2db
$ sqlplus / as sysdba
bash: sqlplus:command not found
$ sqlplus sys as sysdba
bash: sqlplus:command not found
What do I have to do to be able to log in as sysdba into the database in user2 and not through oracle user?
Thanks
Panam
|
|
|
|
|
|
|
|
|
Re: can't connect as sys in added user [message #476501 is a reply to message #476477] |
Thu, 23 September 2010 11:06 |
PanamDimas
Messages: 63 Registered: April 2010 Location: Maryland . U.S.A
|
Member |
|
|
Hello Mahesh,
Thanks for your patience and attention.
I still have problem getting in.
below is all i did.
Kindly inspect:
$ export ORACLE_HOME=/home/oracle/app/product/11/1.0/db_1
$ export PATH=$PATH:$ORACLE_HOME/bin
$ sqlplus / as sysdba
bash: sqlplus:command not found
$ sqlplus sys as sysdba
bash: sqlplus:command not found
$ cd /home/oracle/
bash: /home/oracle/:Permission denied.
My oracle home is correct in my .bash_profile.
Could be that I did not use chown when i created the user2
Thank you
Panam
|
|
|
|
|
|
Re: can't connect as sys in added user [message #476517 is a reply to message #476510] |
Thu, 23 September 2010 12:05 |
PanamDimas
Messages: 63 Registered: April 2010 Location: Maryland . U.S.A
|
Member |
|
|
Thanks for the care Mahesh,
I must confess I am really lost here.
All I want to do is have a user I can login through and do normal creating of tables and so on. And only login through Oracle user to trouble shoot.
Can u please guide me on how to go about it?
This is how I created the user:
$ useradd m g dba user2
$ passwd user2
$ New UNIX password: 888888
Retype new UNIX password: 888888
passwd: all authentication tokens updated successfully
I logged out as root and logged in user2
$ export ORACLE_SID=user2db
$ echo $ORACLE_SID
user2db
$ sqlplus / as sysdba
bash: sqlplus:command not found
$ sqlplus sys as sysdba
bash: sqlplus:command not found
below is the content of my bash_profile (Oracle user)
#ORACLE SETTINGS
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/home/oracle/app; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1; export ORACLE_HOME
ORACLE_SID=boomiedb; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
echo " YAHWEH IS MY ALL.,
In the province of the mind, what one believes to be true either is true, or becomes true"
ORACLE_SID=boomiedb
ORAENV_ASK=NO
export ORACLE_SID ORAENV_ASK
|
|
|
|
|
|
|
Re: can't connect as sys in added user [message #476710 is a reply to message #476703] |
Fri, 24 September 2010 14:36 |
John Watson
Messages: 8961 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Please post the results of the two commands! The command
ls -al /home/oracle
will show you the user and group of each file and the directory itself, with the access permissions. The command
id
will show you your user and group. I am 100% certain that you have installed your Oracle home into the home directory of the oracle user, and that the permissions on that directory will not permit your user to see it, even though he is in the dba group.
That is the problem. So prove it, and I'll tell you the solution.
|
|
|
Re: can't connect as sys in added user [message #476723 is a reply to message #476321] |
Fri, 24 September 2010 15:39 |
PanamDimas
Messages: 63 Registered: April 2010 Location: Maryland . U.S.A
|
Member |
|
|
Hello John,
Thanks for your patience.
Below are the files:
The user2 is actually Boomie
and the other user is oracle
[root@Eagle2 ~]# ls -la /home/Boomie/
total 108
drwx------ 16 Boomie dba 4096 Sep 23 20:56 .
drwxr-xr-x 5 root root 4096 Sep 22 07:08 ..
-rw------- 1 Boomie dba 1208 Sep 23 20:56 .bash_history
-rw-r--r-- 1 Boomie dba 33 Sep 22 07:08 .bash_logout
-rw-r--r-- 1 Boomie dba 1001 Sep 23 20:32 .bash_profile
-rw-r--r-- 1 Boomie dba 124 Sep 22 07:08 .bashrc
drwxr-xr-x 3 Boomie dba 4096 Sep 23 19:43 Desktop
-rw------- 1 Boomie dba 26 Sep 22 07:09 .dmrc
drwxr-x--- 2 Boomie dba 4096 Sep 22 07:09 .eggcups
-rw-r--r-- 1 Boomie dba 515 Sep 22 07:08 .emacs
-rw------- 1 Boomie dba 16 Sep 23 06:17 .esd_auth
drwx------ 4 Boomie dba 4096 Sep 23 19:45 .gconf
drwx------ 2 Boomie dba 4096 Sep 23 20:56 .gconfd
drwxr-xr-x 3 Boomie dba 4096 Sep 22 07:09 .gnome
drwx------ 6 Boomie dba 4096 Sep 23 20:56 .gnome2
drwx------ 2 Boomie dba 4096 Sep 22 07:09 .gnome2_private
drwxr-xr-x 2 Boomie dba 4096 Sep 22 07:09 .gstreamer-0.10
-rw-r--r-- 1 Boomie dba 88 Sep 22 07:09 .gtkrc-1.2-gnome2
-rw------- 1 Boomie dba 0 Sep 23 20:56 .ICEauthority
drwx------ 3 Boomie dba 4096 Sep 22 07:09 .metacity
drwxr-xr-x 4 Boomie dba 4096 Sep 22 07:08 .mozilla
drwxr-xr-x 3 Boomie dba 4096 Sep 23 11:33 .nautilus
drwxr-xr-x 3 Boomie dba 4096 Sep 23 19:05 .openoffice.org
-rw-r--r-- 1 Boomie dba 1485 Sep 23 19:43 .recently-used.xbel
drwxr-xr-x 3 Boomie dba 4096 Sep 22 07:09 .redhat
drwx------ 4 Boomie dba 4096 Sep 23 19:18 .Trash
-rw------- 1 Boomie dba 673 Sep 23 20:32 .viminfo
[root@Eagle2 ~]# ls -la /home/oracle/
total 244
drwx------ 20 oracle dba 4096 Sep 24 12:28 .
drwxr-xr-x 5 root root 4096 Sep 22 07:08 ..
drwxr-xr-x 3 oracle dba 4096 Sep 1 16:15 11g_32_BIT
drwxrwx--- 11 oracle dba 4096 Sep 1 16:51 app
-rw------- 1 oracle dba 6650 Sep 24 12:17 .bash_history
-rw-r--r-- 1 oracle dba 33 Sep 1 09:06 .bash_logout
-rw-r--r-- 1 oracle dba 1010 Sep 23 20:55 .bash_profile
-rw-r--r-- 1 oracle dba 176 Sep 1 09:17 .bash_profile.bak
-rw-r--r-- 1 oracle dba 124 Sep 1 09:06 .bashrc
drwxr-xr-x 3 oracle dba 4096 Sep 20 10:05 Desktop
-rw------- 1 oracle dba 26 Sep 1 09:12 .dmrc
drwxr-x--- 2 oracle dba 4096 Sep 1 09:12 .eggcups
-rw-r--r-- 1 oracle dba 515 Sep 1 09:06 .emacs
-rw------- 1 oracle dba 16 Sep 1 09:39 .esd_auth
drwx------ 4 oracle dba 4096 Sep 24 11:35 .gconf
drwx------ 2 oracle dba 4096 Sep 24 12:28 .gconfd
drwxr-xr-x 3 oracle dba 4096 Sep 1 09:12 .gnome
drwx------ 6 oracle dba 4096 Sep 24 12:28 .gnome2
drwx------ 2 oracle dba 4096 Sep 1 09:12 .gnome2_private
drwxr-xr-x 2 oracle dba 4096 Sep 1 09:12 .gstreamer-0.10
-rw-r--r-- 1 oracle dba 88 Sep 1 09:12 .gtkrc-1.2-gnome2
-rw------- 1 oracle dba 0 Sep 24 12:28 .ICEauthority
drwx------ 3 oracle dba 4096 Sep 1 09:18 .local
drwx------ 3 oracle dba 4096 Sep 1 09:12 .metacity
drwxr-xr-x 5 oracle dba 4096 Sep 2 09:48 .mozilla
drwxr-xr-x 3 oracle dba 4096 Sep 1 09:39 .nautilus
drwxr-xr-x 3 oracle dba 4096 Sep 1 09:18 .openoffice.org
-rw-r--r-- 1 oracle dba 4040 Sep 23 09:07 .recently-used.xbel
drwxr-xr-x 3 oracle dba 4096 Sep 1 09:12 .redhat
drwx------ 3 oracle dba 4096 Sep 4 11:01 .thumbnails
drwx------ 2 oracle dba 4096 Sep 23 11:15 .Trash
-rw------- 1 oracle dba 3033 Sep 23 09:05 .viminfo
[root@Eagle2 Boomie]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
|
|
|
Re: can't connect as sys in added user [message #476744 is a reply to message #476723] |
Sat, 25 September 2010 02:22 |
John Watson
Messages: 8961 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You didn't run id as Boomie, which was what I asked, but never mind. The problem is clear: your new user may be in the dba group (check this by running id as Boomie) but the access modes on /home/oracle do not let him see it. However, the access modes on /home/oracle/app are OK. So this is all you need to do:
As user oracle,
chmod 775 /home/oracle
As user Boomie,
export ORACLE_HOME=/home/oracle/app/product/11/1.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=boomiedb
sqlplus / as sysdba
and everything will be fine (assuming that those variables are indeed what they should be.)
|
|
|
|
|
|
|
Re: can't connect as sys in added user [message #476777 is a reply to message #476774] |
Sat, 25 September 2010 17:54 |
PanamDimas
Messages: 63 Registered: April 2010 Location: Maryland . U.S.A
|
Member |
|
|
Sir
Boomie is the new user.
(different from oracle user)
[Boomie@Eagle2 ~]$ ls -l $ORACLE_HOME/dbs
total 563300
-rw-r----- 1 oracle dba 58880 Sep 24 09:40 arch1_10_730201908.dbf
-rw-r----- 1 oracle dba 7542272 Sep 24 11:32 arch1_11_730201908.dbf
-rw-r----- 1 oracle dba 58880 Sep 24 11:34 arch1_12_730201908.dbf
-rw-r----- 1 oracle dba 2514432 Sep 24 13:08 arch1_13_730201908.dbf
-rw-r----- 1 oracle dba 59392 Sep 24 13:10 arch1_14_730201908.dbf
-rw-r----- 1 oracle dba 1390080 Sep 25 12:42 arch1_15_730201908.dbf
-rw-r----- 1 oracle dba 59904 Sep 25 12:44 arch1_16_730201908.dbf
-rw-r----- 1 oracle dba 41154048 Sep 22 06:55 arch1_24_728644847.dbf
-rw-r----- 1 oracle dba 70656 Sep 22 06:58 arch1_25_728644847.dbf
-rw-r----- 1 oracle dba 51229184 Sep 22 22:11 arch1_26_728644847.dbf
-rw-r----- 1 oracle dba 46817280 Sep 21 05:52 arch1_2_730201908.dbf
-rw-r----- 1 oracle dba 42890240 Sep 22 06:55 arch1_27_728585674.dbf
-rw-r----- 1 oracle dba 51228672 Sep 23 04:52 arch1_27_728644847.dbf
-rw-r----- 1 oracle dba 66560 Sep 22 06:57 arch1_28_728585674.dbf
-rw-r----- 1 oracle dba 22779904 Sep 23 17:57 arch1_28_728644847.dbf
-rw-r----- 1 oracle dba 51229184 Sep 22 21:00 arch1_29_728585674.dbf
-rw-r----- 1 oracle dba 59904 Sep 23 18:00 arch1_29_728644847.dbf
-rw-r----- 1 oracle dba 51226112 Sep 23 04:00 arch1_30_728585674.dbf
-rw-r----- 1 oracle dba 8937984 Sep 24 09:37 arch1_30_728644847.dbf
-rw-r----- 1 oracle dba 25395712 Sep 23 17:57 arch1_31_728585674.dbf
-rw-r----- 1 oracle dba 60416 Sep 24 09:39 arch1_31_728644847.dbf
-rw-r----- 1 oracle dba 65024 Sep 23 17:59 arch1_32_728585674.dbf
-rw-r----- 1 oracle dba 6327808 Sep 24 11:31 arch1_32_728644847.dbf
-rw-r----- 1 oracle dba 8448000 Sep 24 09:36 arch1_33_728585674.dbf
-rw-r----- 1 oracle dba 69632 Sep 24 11:33 arch1_33_728644847.dbf
-rw-r----- 1 oracle dba 66048 Sep 24 09:38 arch1_34_728585674.dbf
-rw-r----- 1 oracle dba 4523008 Sep 24 13:07 arch1_34_728644847.dbf
-rw-r----- 1 oracle dba 12937216 Sep 24 11:31 arch1_35_728585674.dbf
-rw-r----- 1 oracle dba 74240 Sep 24 13:10 arch1_35_728644847.dbf
-rw-r----- 1 oracle dba 61440 Sep 24 11:33 arch1_36_728585674.dbf
-rw-r----- 1 oracle dba 3642368 Sep 25 12:41 arch1_36_728644847.dbf
-rw-r----- 1 oracle dba 58880 Sep 21 05:55 arch1_3_730201908.dbf
-rw-r----- 1 oracle dba 5021184 Sep 24 13:07 arch1_37_728585674.dbf
-rw-r----- 1 oracle dba 88064 Sep 25 12:44 arch1_37_728644847.dbf
-rw-r----- 1 oracle dba 63488 Sep 24 13:09 arch1_38_728585674.dbf
-rw-r----- 1 oracle dba 3607040 Sep 25 12:41 arch1_39_728585674.dbf
-rw-r----- 1 oracle dba 67072 Sep 25 12:43 arch1_40_728585674.dbf
-rw-r----- 1 oracle dba 25041408 Sep 22 06:56 arch1_4_730201908.dbf
-rw-r----- 1 oracle dba 60416 Sep 22 06:59 arch1_5_730201908.dbf
-rw-r----- 1 oracle dba 51229184 Sep 22 22:15 arch1_6_730201908.dbf
-rw-r----- 1 oracle dba 26315264 Sep 23 17:58 arch1_7_730201908.dbf
-rw-r----- 1 oracle dba 58368 Sep 23 18:01 arch1_8_730201908.dbf
-rw-r----- 1 oracle dba 3658752 Sep 24 09:37 arch1_9_730201908.dbf
-rw-rw---- 1 oracle dba 1544 Sep 25 12:44 hc_backupdb.dat
-rw-rw---- 1 oracle dba 1544 Sep 25 13:34 hc_boomiedb.dat
-rw-rw---- 1 oracle dba 1544 Sep 25 12:44 hc_danielladb.dat
-rw-rw---- 1 oracle dba 12920 May 3 2001 initdw.ora
-rw-rw---- 1 oracle dba 8385 Sep 11 1998 init.ora
-rw-r----- 1 oracle dba 24 Sep 20 09:51 lkBACKUPDB
-rw-r----- 1 oracle dba 24 Sep 1 16:54 lkBOOMIEDB
-rw-r----- 1 oracle dba 24 Sep 2 09:20 lkDANIELLA
-rw-r----- 1 oracle dba 24 Sep 2 09:25 lkDANIELLADB
-rw-r----- 1 oracle dba 1536 Sep 20 09:53 orapwbackupdb
-rw-r----- 1 oracle dba 1536 Sep 1 17:04 orapwboomiedb
-rw-r----- 1 oracle dba 1536 Sep 2 09:30 orapwdanielladb
-rw-r----- 1 oracle dba 9748480 Sep 21 10:08 snapcf_boomiedb.f
-rw-r----- 1 oracle dba 9748480 Sep 21 10:22 snapcf_danielladb.f
-rw-r----- 1 oracle dba 3584 Sep 25 14:01 spfilebackupdb.ora
-rw-r----- 1 oracle dba 3584 Sep 25 14:35 spfileboomiedb.ora
-rw-r----- 1 oracle dba 3584 Sep 25 14:00 spfiledanielladb.ora
|
|
|