Operating System - HP-UX
1820116 Members
3173 Online
109619 Solutions
New Discussion юеВ

Re: # prompt if logged in as a user

 
SOLVED
Go to solution
s.kalaivanan
Advisor

# prompt if logged in as a user

Hi All ,

I'm facing a problem , after rebooted the HP-ux 11iv3 server when user logged in by su the prompt is appearing # instead of $ but giving id command it is showing user ID what file needs to check ? i have compared these files /etc/profile , .profile and $HOME/.profile from working server seems settings are same ,

Thanks in advance ,

Thanks & Regards,
Kalai.
11 REPLIES 11
Pete Randall
Outstanding Contributor

Re: # prompt if logged in as a user

What do you mean "logged in by su"? Who are they originally logging in as? Are they just doing "su" or are they doing "su -"?


Pete

Pete
Logesh Rasumani
New Member
Solution

Re: # prompt if logged in as a user

Kalai,

Hope you are asking about the change in prompt,
Please add the line in the .profile file in the home directory as mentioned to get '$' prompt,
1. export PS1='$'
2. run from home directory . ./.profile
Learning Never ends !!!!
Dennis Handly
Acclaimed Contributor

Re: # prompt if logged in as a user

As Pete said, if you use "su userx" after you are root, PS1 is still "# ". If you want userx's profile, you need to use "su - userx", or Logesh mentioned, you can just change PS1.
Kapil Jha
Honored Contributor

Re: # prompt if logged in as a user

your .profile file etc would only execute only if you do a 'su - userid'
if u do a su userid your variables would be same except u would be logged as new user.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
s.kalaivanan
Advisor

Re: # prompt if logged in as a user

hello all ,

I need while user login the prompt should come $ , not for root user ,

Logesh:- Not $ symbol for root user login , you mean to say after logged in by user then edit $HOME/.profile inside the user login right ? not from root login right ?

Thanks & Regards,
Kalai.
Torsten.
Acclaimed Contributor

Re: # prompt if logged in as a user

As said several times by others, question is if you do "su user" or "su - user".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
s.kalaivanan
Advisor

Re: # prompt if logged in as a user

Hi Torsten,

Users are using < su - username >


Thanks ,

Kalai .
Dennis Handly
Acclaimed Contributor

Re: # prompt if logged in as a user

>Users are using "su - username"

What does "echo $PS1" show?
What does "echo ~/.profile" show?
Does ~/.profile set PS1? To what?
Torsten.
Acclaimed Contributor

Re: # prompt if logged in as a user

One more question:

What shell is used?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
s.kalaivanan
Advisor

Re: # prompt if logged in as a user

Very sorry for late response to all ,

I went user Home directory and edited .profile and put PS1 as $ ,

Problem solved ,

Many thanks to all ,

Thanks ,

Kalai.
Michael Steele_2
Honored Contributor

Re: # prompt if logged in as a user

Dude, you need to go back and assign point to every responder, that's 38 total. Check your profile for a count verification.
Support Fatherhood - Stop Family Law