- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to: Display message before login prompt
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2009 09:19 PM
тАО02-14-2009 09:19 PM
How to: Display message before login prompt
How i could display a message before login prompt, so when any try to telnet so it appear with bold and large fons?
Regards,
J.F.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2009 11:26 PM
тАО02-14-2009 11:26 PM
Re: How to: Display message before login prompt
Add -b banner file in /etc/inetd.conf
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/banner
/etc/banner can have your customized message
Remember to inetd -c after editing /etc/inetd.conf
Regards,
Javed Khan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 12:16 AM
тАО02-15-2009 12:16 AM
Re: How to: Display message before login prompt
Regads,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 01:34 AM
тАО02-15-2009 01:34 AM
Re: How to: Display message before login prompt
The telnet protocol has no standard way of changing text attributes or font size: all this must be done using terminal control codes... and before login, you have no way of knowing the type of the client terminal (or terminal emulator). The terminal type of the client is identified only after login, when the /etc/profile script (or equivalent) runs the ttytype command. After that, the TERM environment variable is available and most tools use it to select the correct control codes automatically.
If you use the control codes of the most common terminal type, someone connecting with an uncommon terminal may see only garbage. You'll want your pre-login message to be readable by absolutely anyone, so it's best to keep it simple. This means US-ASCII only, no bold or font size tricks. You can use blank lines to make sure your message is visibly separated from any text above & below, and ALL CAPS or big ASCII art text if you feel you really need it.
If the message is needed for legal reasons, keep it as simple as possible: if it isn't readable with a single glance, your regular users will learn to ignore it completely within a week or so. In the first month or so they may still read it, but their brains will think only "blah blah, the standard message with no new information, where is the login prompt". After a month or so, their brains will recognize the general shape of the text block and skip over it, just like with Web ad banners.
---
Javed's instructions in a simpler format:
1.) Create a text file and write your message in it. (ASCII only, no .doc files or anything like that: just .txt)
2.) Move/rename the file to "/etc/banner"
(you can use a different name if you wish)
3.) Make a backup of your current /etc/inetd.conf, just in case:
cp /etc/inetd.conf /etc/inetd.conf.backup
4.) Edit /etc/inetd.conf. It should have a line like this:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd
Change it to this:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/banner
(if you used a different filename in step 2, use the correct filename instead of /etc/banner here too)
5.) After editing inetd.conf, run this command to make the changes effective immediately:
inetd -c
6.) Do not log out your current connection: open another telnet connection to test that your change works. If the banner is displayed and you can still log in, you're done.
If you cannot connect with telnet anymore, you made a bad mistake in editing the /etc/inetd.conf file. Use your first connection to restore the inetd configuration back to the original:
cp /etc/inetd.conf.backup /etc/inetd.conf
inetd -c
Then try again starting from step 4.
If you need to change your pre-login message, just edit /etc/banner. The change will be effective immediately.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 01:46 AM
тАО02-15-2009 01:46 AM
Re: How to: Display message before login prompt
Javed's steps are basically:
1) Edit /etc/inetd.conf, find the line with telnet.
2) Add "-b /etc/banner" to the end.
3) Create /etc/banner with your message
(I'm not sure how to do bold/large fonts.)
4) Do the following to activate: inetd -c
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 02:32 AM
тАО02-15-2009 02:32 AM
Re: How to: Display message before login prompt
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 04:19 AM
тАО02-15-2009 04:19 AM
Re: How to: Display message before login prompt
Your queries are well explained by Matti.
I also have no idea how to get the message in bold and large font however if you want to differentiate message content you can always use upper case and lower case letters.
I believe this should meet your requirement.
Regards,
Javed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 03:49 PM
тАО02-15-2009 03:49 PM
Re: How to: Display message before login prompt
In order to provide enhanced displays, you must first find an emulator that can display special font characteristics like bold, color, size, blinking, inverse video, underlining, and so on. Then purchase copies for every user so there will only be one terminal emulator ever used to login to your system, and at that point, you can hard-code the special codes into the banner file.
By the way, the default (and preferred) pre-login message file is /etc/issue rather than /etc/banner. This file will be displayed before any login prompt. To make sure all logins use this file, modify the two lines in /etc/inetd.conf:
telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd -b/etc/issue
login stream tcp6 nowait root /usr/lbin/rlogind rlogind -B /etc/issue
Now if installing new emulators for all of your users is not an option, you can use the banner program to draw very large words:
banner Private System > /etc/issue
You can then edit this file with additional comments. You can put many lines into this file.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 08:57 PM
тАО02-15-2009 08:57 PM
Re: How to: Display message before login prompt
> is completely meaningless. [...]
No, it's just that the display capabilities
are determined by the display.
> [...] features of your terminal emulator
> [...]
Or your actual terminal. Some of us still
own hardware.
> [...] you must first find an emulator [...]
Or any collection of emulators (and/or actual
terminals) which offer the required
capabilities. I suspect that more than one
terminal or terminal emulator can deal with
the standard VT100 double-height line escape
sequences, and I suspect that several others
can not. On a DECterm on my VMS systems,
this works just fine:
dy # /bin/echo '\033#3fred\n\033#4fred'
On an hpterm (not known for its VT100
compatibility), it's a loser. An xterm does
a little better (but not much).
This may be the least commonly supported
character attribute in the VT100 collection,
but that's a long way from "only [...] one".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-15-2009 10:20 PM
тАО02-15-2009 10:20 PM
Re: How to: Display message before login prompt
For bold (meaning it needs to stand out),
we simply d o u b l e s p a c e the characters.
Never heard any complaints ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-16-2009 09:00 AM
тАО02-16-2009 09:00 AM
Re: How to: Display message before login prompt
> On an hpterm (not known for its VT100 compatibility), it's a loser.
...just like Hazeltine, Wyse, IBM 3270 and many other terminal emulations. Each manufacturer (about 30 years ago) designed their own terminal hardware and display enhancements. HP designed their terminal enhancement set in the late 1970's with the introduction of the HP 2640A widescreen terminal. Based on escape sequences, dozens of character enhancements were designed into the HP terminal standard. Today, there are more devices based on this code than all other devices in the world put together. That's because HP terminal sequences are the base for HP's PCL code used in millions of laser and inkjet printers throughout the world.
hpterm is actually a cheap imitation of 'real' HP terminals with some basic incompatibilities with the HP terminal product line. Other than plain ASCII, hpterm can never display vt100 sequences, just like a Wyse terminal cannot display vt100 enhancements. Even though HP terminals are much more versatile than the ubiquitous vt100, the Unix world defaulted to the vt100, due in no small part to the high price of HP terminals.
Wyse has quietly disappeared and HP terminal emulators are limited to the free QCTerm, hpterm and the (pricey) Reflection for HP emulator. Most of the HP character-based menu programs (Glance, swinstall, sam, etc) are much easier to navigate with an HP terminal. But just like BetaMax versus VHS, the better code standard is fading away.
It is also interesting to see what "vt100" really means:
http://vt100.net
Virtually none of the display enhancements ascribed to vt100 are compatible with a real vt100. Usually, vt100 emulators pick a vt220 or vt320 as they are much more useful. For instance, if you can scroll backwards through hundreds of lines of memory, then the emulator is not a proper vt100.
Bill Hassell, sysadmin