Solved

Message before/on login

Posted on 2012-03-28
3
460 Views
Last Modified: 2012-08-14
Is it possible to display a message before login on Ubuntu?

On startup of my Ubuntu server, I have:-
Ubuntu 11.10 ubbuntu tty1

Ubuntu login: _

What Id like it to display is its IP address, so something like:-
Ubuntu 11.10 ubbuntu tty1
IP address - 192.168.1.32
Remote Administration on 192.168.1.32:10000
Default Username/Password: user1/pwd1

Ubuntu login: _
(Where its IP address retrived from DHCP id 192.168.1.32)


And then once logged in, display a message such as:-
This is a private server, if you should not be here, please leave.

Ive read that there are scripts that run at the times I need, but I dont know what they are, or what they are called.

I also dont know how to 'echo' out these commands, Im assuming something like:-
echo Remote Administration on 192.168.1.32:10000

Open in new window

, but I also dont know how to retrive just the IP address.

Sorry for not knowing much on this, and asking soo much on this one question!

Thank you
0
Comment
Question by:tonelm54
3 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 37776419
Believe me,

you really don't want to tell just anybody who's able to reach your server via telnet a username and matching password!
0
 

Author Comment

by:tonelm54
ID: 37776888
True, although really the purpose is to put the ip address in, so once the server is put in on site a keyboard isn't required to set it up, instead I can use another pc to configure a static ip and set it up.

Thank you
0
 
LVL 5

Accepted Solution

by:
1ly4me earned 500 total points
ID: 37777758
To customize your TTY login edit /etc/issue file . For more info
#man getty
To customize login messages edit /etc/motd file. its better to run a cron job for specific IP and dump the output to /etc/motd file
For Ex, in crontab,
10 * * * *  echo 'This is a private server, if you should not be here, please leave' > /etc/motd

Open in new window

This cron will run for very five 10 minutes and dump output to /etc/motd
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

911 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

18 Experts available now in Live!

Get 1:1 Help Now