LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-03-2010, 02:22 PM   #1
m130
LQ Newbie
 
Registered: May 2010
Posts: 6

Rep: Reputation: 0
Unhappy RHEL 5.5 and MOTD and other


Hello,
I am using the RHEL 5.5 Linux and have a issue editing the motd. I have "vi /etc/motd" INSERT Mode and put my text in place. I did a :wq and exited. the motd doesn't show my text. I need for the text to be the same for all users that log in and also need help setting the background and screensave also for all users and not be able to change it. I know someone may have covered this and I am sorry posting a elementary thing but I have beat my brains out.
 
Old 05-03-2010, 02:23 PM   #2
m130
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
I meant to say that I can vi the motd file and it shows the text but not at the login..
 
Old 05-03-2010, 04:18 PM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by m130 View Post
I meant to say that I can vi the motd file and it shows the text but not at the login..
Could you please give the output of this command.
Code:
cat /etc/motd
 
Old 05-04-2010, 07:10 AM   #4
m130
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
I would love to post the text of the banner but I can't. I do show the text of what I want it to say. I can't show the text since the text is sensitive. I am sorry for this but hope this explains somewhat?? I am wondering if I have an issue with line breaks.
 
Old 05-04-2010, 02:40 PM   #5
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by m130 View Post
I can't show the text since the text is sensitive.
Write some random text there for test purpose and then show up.
 
Old 05-05-2010, 07:05 AM   #6
m130
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
[root@localhost ~]# cat /etc/motd
This is a test computer.
Please be advised that you
may not at any time do what you want to do on
this computer
[root@localhost ~]#
 
Old 05-05-2010, 07:07 AM   #7
m130
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
This is some text I put in the motd and cat the file
 
Old 05-05-2010, 04:00 PM   #8
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by m130 View Post
[root@localhost ~]# cat /etc/motd
This is a test computer.
Please be advised that you
may not at any time do what you want to do on
this computer
[root@localhost ~]#
I do not know why this is not working. Ideally it should work.

BUT, I have another option which will act similarly.

Login as root and put cat /etc/motd in the very first line of /etc/profile.

This will also display each user the message (in /etc/motd) whenever he/she will login.

I have tested this.
 
1 members found this post helpful.
Old 05-07-2010, 10:28 AM   #9
m130
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Do you want me to cat two different files? Sorry, I am not sure of what you were saying. Thanks for your help.
 
Old 05-07-2010, 07:29 PM   #10
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Debian, OS X
Posts: 1,298

Rep: Reputation: 102Reputation: 102
Thumbs up

Quote:
Originally Posted by m130 View Post
Do you want me to cat two different files? Sorry, I am not sure of what you were saying. Thanks for your help.
No worries, just login as root and follow these steps
Code:
1) Put whatever you want to in /etc/motd
2) cp -p /etc/profile /etc/profile_old
3) sed -i "1i\\cat /etc/motd" /etc/profile
Hope this helps

Last edited by vikas027; 05-07-2010 at 07:31 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
/etc/motd skate Linux - Software 5 05-03-2006 09:44 AM
motd toothe Linux - Newbie 2 11-08-2005 05:02 PM
Motd wizex Slackware 6 09-05-2005 09:27 AM
motd Master Fox Linux - Software 2 08-25-2004 08:40 AM
Is there any MOTD software available besides /etc/motd? csif Linux - Software 1 04-24-2004 07:36 AM


All times are GMT -5. The time now is 11:16 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration