Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-04-11
3
Medium Priority
?
1,095 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

730 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