Solved

have the ubuntu server text mode logon screen show current IP addresses

Posted on 2007-04-11
3
1,081 Views
Last Modified: 2013-12-16
Ubuntu 6.06 LTS server - is the version. It boots to the text logon screen.

Question is how to get the logon screen to display the IP address.

The reason is that the install is a VMware Image running on a laptop, the image gets different IP addresses depending where I boot it up at, I would like to see that IP address along with the logon screen.

If there is a linux term for that text mode logon screen please let me know (tty1)?.

I used a VMware image from rPath that had this feature, but am not longer running it.

Thanks,
Mark
0
Comment
Question by:markpalinux
  • 2
3 Comments
 
LVL 2

Expert Comment

by:xalaros
ID: 18941841
Hi there,

First of all which greeting message you're seeing at logon depends on the way you're trying to login e.g. when you're opening a local console to the system the file /etc/issue is read and displayed back to you, while when you try to remote connect to the machine /etc/issue.net does the job. After that the file /etc/motd is diplayed back to your terminal but only after a successfull login.

Now, the files /etc/issue & /etc/issue.net accepts some escaped characters that are after translated by the mingetty program to something that makes sense to you.

From the manual page of mingetty:
       \d     insert current day (localtime),
       \l     insert line on which mingetty is running,
       \m     inserts machine architecture (uname -m),
       \n     inserts machineâs network node hostname (uname -n),
       \o     inserts domain name,
       \r     inserts operating system release (uname -r),
       \t     insert current time (localtime),
       \s     inserts operating system name,
       \u     resp. \U the current number of users which are currently logged in.  \U inserts
              "n users", where as \u only inserts "n".
       \v     inserts operating system version (uname -v).

Can't find anything that applies to your problem. I hope that someone else holds the answer so we can both learn something :)

Just my 5c,
/x
0
 
LVL 15

Author Comment

by:markpalinux
ID: 18950599
xalaros,

I think this page has the script to read and report the ip addresses, can you give info on how I can combine them.

http://bash.cyberciti.biz/script/read-ip-address.bash.php

I am running Ubuntu 7.04 Feisty Fawn

Thanks,
Mark
0
 
LVL 2

Accepted Solution

by:
xalaros earned 250 total points
ID: 18951361
Dear Mark,

I think there is no possible way to combine the files i mentioned with a shell script.

One other thought is to place that script into your /etc/rc.d/rc.local and have the ip address of the machine diplayed JUST before your login prompt. Does something like that suit you?

Just my 5c,
/x

0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now