Operating System - Linux
1829396 Members
1536 Online
109991 Solutions
New Discussion

How to change the login prompt

 
Deny DeRosier_1
Occasional Contributor

How to change the login prompt

We have a couple of HP-UX 10.20 servers and I would like to modify the login prompt to display the id of that server. How do I do that?
3 REPLIES 3
Alexander M. Ermes
Honored Contributor

Re: How to change the login prompt

Hi there.
Put this into the .profile :

export PS1=`hostname`','`whoami`',$PWD,!> '

for Oracle users :

export PS1=`hostname`','`whoami`',${ORACLE_SID:-"none"},$PWD,!
> '



Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Felix J. Liu
Advisor

Re: How to change the login prompt

I guess Deny means the text displayed before user login.

Look at /etc/issue and /etc/issue/net

One is for console and the other for network logins.

You also need to comment out the part in /etc/rc.d/rc.local that will overwrite your /etc/issue everytime you reboot your system.

Hope this helps.
avsrinivas_1
Occasional Advisor

Re: How to change the login prompt

To change the login prompt in HPUX 10.20

simply edit the /etc/issue file of each system
to display the corresponding system names.

No rc.local file is needed to be modified.
Because in HPUX 10.20 the FS is been changed to
10FSL. here the startup scripts are placed in
/sbin/rc* directories for each runlevel and
the configuration files are in /etc/rc.config.d
directory.

Happy Tuning.

Be Dynamic