Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

/etc/motd login message

Posted on 2007-04-04
8
Medium Priority
?
1,127 Views
Last Modified: 2013-12-16
What script is responsible for displaying the /etc/motd file?  I am logging in using SSH, and I have slackware 11.0.  I have looked inside /etc/profile and also /etc/profile.d/* but I don't see where it is called from.
0
Comment
Question by:bryanlloydharris
[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
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 1000 total points
ID: 18853738
/usr/bin/login is responsible
0
 
LVL 2

Expert Comment

by:mostenscer
ID: 18854060
/etc/ssh/sshd_config
can be used as well :)
0
 
LVL 84

Expert Comment

by:ozo
ID: 18854109
or
/etc/sshrc
or
~/.ssh/rc
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 1000 total points
ID: 18854216
To ensure the motd is displayed when logging in via ssh, you need to edit /etc/ssh/sshd_config and ensure you have:

PrintMotd yes

set.  

Don't forget to restart sshd after making any configuration changes.
0
 
LVL 2

Expert Comment

by:mostenscer
ID: 18854238
for all new users created on the system consider having a look at dir
/etc/skel/
0
 
LVL 14

Expert Comment

by:kenfcamp
ID: 18854780
The file(s) that directly handle the MOTD display are /etc/profile and files within the /etc/profile.d directory
(csh and tcsh shells use /etc/csh.login)

For example:

The files within /etc/profile.d/ that handle the default MOD quotes are
bsd-games-login-fortune.csh and bsd-games-login-fortune.sh

bsd-games-login-fortune.csh is for csh and tcsh shells
bsd-games-login-fortune.sh is for bash etc
0
 
LVL 14

Expert Comment

by:kenfcamp
ID: 18854790
Sorry, forgot to mention.

If you wanted to disable the display of the motd for every login regardless of how they are logging in,

comment out bsd-games-login-fortune.csh and/or bsd-games-login-fortune.sh

Each file is about 3 lines, so to disable comment out each line (add a # in front of each)
0
 
LVL 3

Author Comment

by:bryanlloydharris
ID: 18889281
I'm sorry not to have closed this.  I ended up using the .hushlogin file to suppress the message.
0

Featured Post

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

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

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…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

730 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