Operating System - HP-UX
1830080 Members
12067 Online
109998 Solutions
New Discussion

Displaying the hostname on an HP console prior to logging in

 
Pamela Husband
New Member

Displaying the hostname on an HP console prior to logging in

Does anyone have any information regarding the file that must be modified in order to display the hostname on an HP console prior to logging in? I'm not sure where the hostname disappeared to, but someone has made changes to a couple of our systems. Any help would be appreciated.
9 REPLIES 9
S.K. Chan
Honored Contributor

Re: Displaying the hostname on an HP console prior to logging in

The file is /etc/issue.
Pamela Husband
New Member

Re: Displaying the hostname on an HP console prior to logging in

O.K. /etc/issue was considered, but what changes need to be made to this file and will the system need to be rebooted to make the changes effective immediately?
James R. Ferguson
Acclaimed Contributor

Re: Displaying the hostname on an HP console prior to logging in

Hi:

No reboot is necessary. Redirect the output of 'uname -a' into '/etc/issue'.

Another choice is to use 'banner $(hostname)' in addition to this. You can create a nice 23-line file that covers a standard terminal display page this way.

Regards!

...JRF...
S.K. Chan
Honored Contributor

Re: Displaying the hostname on an HP console prior to logging in

Well, just edit the file ..
# cd /etc
# vi issue
The file should have permission 444 (owner=bin; group=bin). Typically the content of that file can be anything you want. I have mine like so ..

Hostname jupiter [785/B2000 hpux B.11.11] (Unix Support)

No reboot is needed. You might want to double check /etc/inetd.conf, the line that has "telnetd" to make sure it calls /etc/issue for display.

S.K. Chan
Honored Contributor

Re: Displaying the hostname on an HP console prior to logging in

FYI ..
The "telnet" line in /etc/inetd.conf should lokk like this ..

telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue

The -b option tells telnet to get the banner from /etc/issue. If you need to edit /etc/inetd.conf make sure "inetd" is run afterwards to re-read its configuration.

# /usr/sbin/inetd -c

Michael Tully
Honored Contributor

Re: Displaying the hostname on an HP console prior to logging in

As the other guys have mentioned you place
the hostname of your server in the /etc/issue
file. Change the permissions to 444 only.

If someone is making changes to your system(s)
that you are not aware of the first thing to
implement is change the root password and see
who complains.
Anyone for a Mutiny ?
Bill Hassell
Honored Contributor

Re: Displaying the hostname on an HP console prior to logging in

Just a note about the contents of /etc/issue:

This file is presented to anyone that connects to your system *before* any authentication such as login takes place. Good security dictates not to provide details about a system until after login authentication. uname -a is a common practice but provides not only the type of opsystem (HP-UX) but the revision (ie, 11.0) which is WAY too much information.

Just put the hostname, maybe a helpdesk phone number and perhaps some legal stuff. Certainly don't put the location or purpose of the machine in /etc/issue.


Bill Hassell, sysadmin
V. V. Ravi Kumar_1
Respected Contributor

Re: Displaying the hostname on an HP console prior to logging in

hi,
redirect `uname -n` to /etc/issue

regds
Never Say No
Manuel_8
Advisor

Re: Displaying the hostname on an HP console prior to logging in

To display the machine's name at a login execute the following command:

echo ???$(uname ???n) $(model) ??? > /etc/issue

Now You must edit in /etc/inetd.conf the following lines:


telnet ..............telnetd ???b /etc/issue
login ...............rlogind ???B /etc/issue


After these changes You must execute the command:

inetd -c

to reread the config file.
To verify try to do a telnet and ftp login.