Solved

/etc/motd login message

Posted on 2007-04-04
8
1,111 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 13

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 13

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
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 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…
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.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now