LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2004, 08:01 AM   #1
jestah84
LQ Newbie
 
Registered: May 2004
Location: Sydney, Australia
Distribution: Fedora Core 1 / RH 7.3
Posts: 9

Rep: Reputation: 0
Question MOTD Variables


I am after variables to be shown in my MOTD.
Variables such as:
Kernel Version
Uptime
Users Logged in
System Loads
Username

If these variables are able to be imputted into the MOTD or is there is another way of showing them on a SSH login. I have seen it done before and thought i should also. Would be very useful.

Jestah
 
Old 05-31-2004, 01:28 AM   #2
aeruzcar
Member
 
Registered: Jul 2003
Location: Santiago, Chile
Distribution: Gentoo
Posts: 282

Rep: Reputation: 30
I am not sure what file you should edit but I know that I edited a file I can't remember to execute fortune everytime you login, maybe you can add a line to a configuration file, or you can edit the /etc/motd file and write the stuff that does not change such as kernel version and those things
 
Old 05-31-2004, 05:28 AM   #3
jestah84
LQ Newbie
 
Registered: May 2004
Location: Sydney, Australia
Distribution: Fedora Core 1 / RH 7.3
Posts: 9

Original Poster
Rep: Reputation: 0
thanx for ur reply aeruzcar but i have already setup the majority of my MOTD as static data.

The few variable i am after i have seen on other boxes but have never gotten round to ask them. Now i can't remember where i saw it lol.

Jestah
 
Old 05-31-2004, 05:31 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you possibly want to look at the /etc/issue and /etc/issue.net files instead of /etc/motd, but whichever you use the ways to get the data in there is pretty easy really. you will need to run whatever commands you want in a script associated with a login, e.g /etc/profile /etc/bashrc if you want this data to actually be updated on login. motd's are generally only updated manually on adhoc, or on a daily basis (hence the name!) so what you're after doesn't really fit into the purpose of motd's.. doesn't mean it's not possible

echo uname -a > /etc/issue
echo uptime >> /etc/issue

etc.....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
motd toothe Linux - Newbie 2 11-08-2005 04:02 PM
Motd wizex Slackware 6 09-05-2005 08:27 AM
motd Master Fox Linux - Software 2 08-25-2004 07:40 AM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 06:36 AM
Shel scripting: variables pointing to variables and case Dark_Helmet Programming 5 06-08-2003 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration