Solved

/etc/motd login message

Posted on 2007-04-04
8
1,124 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 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

751 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