Solved

/etc/motd login message

Posted on 2007-04-04
8
1,122 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
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 250 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 250 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

820 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