Solved

Message before/on login

Posted on 2012-03-28
3
482 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
[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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.
Suggested Courses

734 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