Solved

Message before/on login

Posted on 2012-03-28
3
455 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

771 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

13 Experts available now in Live!

Get 1:1 Help Now