Operating System - HP-UX
1826332 Members
3541 Online
109692 Solutions
New Discussion

Re: /etc/issue - /etc/issue - $USER - $LOGNAME - stty cmd

 
SOLVED
Go to solution
Carine Parmentier
Occasional Contributor

/etc/issue - /etc/issue - $USER - $LOGNAME - stty cmd

I am not finding answers to my following outstanding questions. Can some of you help me ?
1. At what time are /etc/issue and /etc/welcome executed. Before or after /etc/profile. Should I have a welcome banner in the profile ?

2. What is the different between $USER and $LOGNAME. Both are displaying the original user name.

3. Support is done on about 200 servers. Each time, stty needs to be set for configuring the the backspace. Can I execute this automatically after login on without changing the profile on every server.

Thanks for your help
4 REPLIES 4
Simon Hargrave
Honored Contributor

Re: /etc/issue - /etc/issue - $USER - $LOGNAME - stty cmd

1. /etc/issue is displayed as a warning message _before_ login (see the /etc/inetd.conf entry for telnetd).

I'm not familiar with /etc/welcome, however /etc/motd (message of the day) is displayed after login, which is handled by the global profile /etc/profile.

Use /etc/issue for "unauthorised access will be prosecuted" type messages, and /etc/motd for specific messages on the server - eg "your home directories have moved" and such like.

2. Not sure there is a difference, but $LOGNAME is more "fundamental" (set by the shell rather than scripts). $USER tends to be set in profiles but isn't guaranteed.

3. Configure your telnet/ssh client to use the same backspace character. eg if you use PuTTY, go to the Terminal...Keyboard settings and choose ^H instead of ^? as the backspace character. If you use a different client then try and find a similar setting.

Sanjay_6
Honored Contributor

Re: /etc/issue - /etc/issue - $USER - $LOGNAME - stty cmd

Hi,

/etc/issue is the banner displayed for all serial ttys. IT is displayed as a banner if so configured for telnet. Search on how to set the telnet banner. /etc/welcome is probably a custom banner at your site.

$USER & $LOGNAME are one and the same thing and is basically the unix id of the user. It changes to the new id if the user su'ed to the new id.

Hope this helps.

Regds
Carine Parmentier
Occasional Contributor

Re: /etc/issue - /etc/issue - $USER - $LOGNAME - stty cmd

Dear,
Thks for the replies.
2. I know that $USER and $LOGNAME are basically the same, but I cannot see a reason why 2 variables are used for one and the same thing. There must be differences in some situations, I just can't find which one.
This is a typical question in courses.
I thought maybe differences in shell or when executing su, but this is not the case.

3. Changing the keyboard mapping to ^h will also be needed on any server. The client is just looking for executing this set of cmd's independant on which server he is logging on.
thanks
Dietmar Konermann
Honored Contributor
Solution

Re: /etc/issue - /etc/issue - $USER - $LOGNAME - stty cmd

Carine,

concerning the difference between USER and LOGNAME... USER is *no* standard environment variable on HP-UX and usually not set. Forget it. ;-) However, some programs are known to export the variable, e.g. ssh and dtlogin/CDE.

On HP-UX LOGNAME is always exported by login(1).

Concerning the backspace configuration... ^H ist the default on HP-UX. ^? is the default in some other environments. Either you change the servers' profiles or you change the client side. That's life. :-)

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)