LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2008, 03:50 AM   #1
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Rep: Reputation: 15
login as oracle user but prompt show [root@ablnx oracle] how come?


Friends,

RHEL AS 3
when ever i log in as oracle user. the prompt is showing [root@ablnx oracle] how the oracle user is changing in to root?
how can i make the prompt to display [oracle@ablnx oracle]?

thanks
 
Old 08-21-2008, 03:59 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
First the silly question: are you sure you logged as oracle user? Try
Code:
who am i
hiding the IP address, if you're going to post the output here. Then, what is the value of the environment variable PS1?
 
Old 08-21-2008, 04:07 AM   #3
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Original Poster
Rep: Reputation: 15
thanks for your reply.

when i type
[root@ablnx oracle]# who am i
oracle tty1 Aug 21 10:39

when i type
[root@ablnx oracle]# whoami
root

how/where to see the environment variable ps1?
 
Old 08-21-2008, 04:34 AM   #4
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Original Poster
Rep: Reputation: 15
ok....here .... the ps1 values
echo $PS1
[\u@\h \W]\$
 
Old 08-21-2008, 04:35 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Quote:
Originally Posted by sathyguy View Post
how/where to see the environment variable ps1?
Just do
Code:
echo $PS1
you will see a string containing some modifiers like \u \h and so on. Depending on the value of this variable, the command prompt will be dinamically updated every time you change user and/or directory. For example on a RHEL4 installation I have:
Code:
[\u@\h \W]\$
this tell to build the prompt using: open square bracket, username, @, hostname, current directory without absolute path, closed square bracket and a litteral $.

Regarding the different output of the "who am i" commands, take in mind that whoami is the same as id -un, whereas who am i is the command who with two special arguments. The different output can be related to the way you logged in as user oracle. What is it?

For example, by using the su command you retain the id of the original user and whoami acts accordingly.
 
Old 08-21-2008, 04:37 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Quote:
Originally Posted by sathyguy View Post
ok....here .... the ps1 values
echo $PS1
[\u@\h \W]\$
Ok. Good. It looks right. How do you log as user oracle?
 
Old 08-21-2008, 04:42 AM   #7
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Original Poster
Rep: Reputation: 15
i have set id:3:initdefault for full multiuser mode.
ablnx login: oracle
password: password

thats it....am i right?
 
Old 08-21-2008, 04:55 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
It looks right. Sincerely I am almost lost, here. Just a last question: what is the output of
Code:
id
once you've logged in as oracle? And how the user oracle has been created?
 
Old 08-21-2008, 05:02 AM   #9
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Original Poster
Rep: Reputation: 15
[root@ablnx oracle]# id
uid=0(root) gid=0(root) groups=0(root)

"how the user oracle has been created?"
Actually i didnt create this user.....the admin who was here before.....created this oracle user. now i am using this one.
 
Old 08-21-2008, 05:24 AM   #10
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
This tells you that oracle is actually root. Like an alias for the username. I don't know how it is possible, but you have to investigate the user accounts and try to understand what's going on. And expecially if there is a reason for that.
 
Old 08-22-2008, 02:56 AM   #11
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 136Reputation: 136
Quote:
Originally Posted by colucix View Post
This tells you that oracle is actually root. Like an alias for the username. I don't know how it is possible, but you have to investigate the user accounts and try to understand what's going on. And expecially if there is a reason for that.
Look in the /etc/passwd. It's likely that for some reason uid for oracle user specified to be 0.
IMHO it should be changed to something reasonable
 
Old 08-23-2008, 02:07 AM   #12
sathyguy
Member
 
Registered: Sep 2005
Location: Indian Working in Saudi Arabia
Distribution: Redhat Linux AS 3.0
Posts: 93

Original Poster
Rep: Reputation: 15
yes.....i think....by seeing this output you can help me...

below is the output of my production server

[root@ablnx oracle]# cat /etc/passwd
oracle:x:501:501::/home/oracle:/bin/bash

here is the output of my test server (this is my problem)
[root@ablnx oracle]# cat /etc/passwd
oracle:x:0:0::/home/oracle:/bin/bash

what to do now?
 
Old 08-23-2008, 02:52 AM   #13
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
First be sure you have a valid root account. Then you can try the command usermod to modify the UID and the GID of the user oracle. Or eventually you can delete it and create it again with the proper UID and GID. Be careful to not delete its home directory. After that, most likely you have to change the ownership of some files and directories, using chown as root.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
show all user in oracle database wantamad Linux - General 3 06-04-2010 10:02 PM
need to change oracle .bash_profile from root user ? shipon_97 Linux - Enterprise 1 08-09-2007 01:27 PM
xhost + as user oracle not working, need to see oracle install GUI enzo250gto Linux - Software 2 02-11-2007 11:27 AM
Getting version of oracle from root user hinetvenkat Linux - Software 2 11-24-2006 01:10 AM
Changing Oracle user password will affect oracle db? sathyguy Linux - Newbie 1 02-11-2006 06:34 PM


All times are GMT -5. The time now is 04:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration