Solved

/etc/motd login message

Posted on 2007-04-04
8
1,113 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Mint 18 31 77
Error installing extension Linux 4 59
AWS CLI - Instances, Volumes & Tagging 2 74
Virtualizing very old guest OS 4 80
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

920 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