Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345
Rep:
One possibility is that motd is run from /etc/profile and .profile in your home directory. Compare the content of both files and see if either of them calls motd. You should also look at .bashrc and .bash_profile if they exist.
cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
fi
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
export PATH
umask 022
cat ~/.profile
# ~/.profile: executed by Bourne-compatible login shells.
# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval `dircolors`
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias ll='ls -la'
alias rm='rm -i'
alias vi='vim'
alias r='route -n'
#alias r0='route -n | grep wlan0'
#alias r1='route -n | grep wlan1'
#alias r2='route -n | grep wlan2'
#alias r3='route -n | grep wlan3'
alias ld='ll -d'
alias down='ifconfig wlan0 down && ifconfig wlan1 down && ifconfig wlan2 down'
Distribution: Slackware 11.0; Kubuntu 6.06; OpenBSD 4.0; OS X 10.4.10
Posts: 345
Rep:
OK, I was shooting from the hip and missed. I've looked at motd's man page now, and I see that /etc/motd is displayed by login "after a successful login but just before it executes the login shell."
What do you get when you do a `cat /etc/motd`? It is possible that the file carries the same message twice. (Hey, it could happen...)
What happens when you put a zero-length file called .hushlogin in your login directory? (In your home directory, do a `touch .hushlogin`.)
Hmm, what happens if you do a "grep -r motd /*" or something along those lines to see if there's a config or startup file somewhere that might be calling it. I assume if that existed it would be in one of the places you've already looked, but it's always worth a shot to double-check everywhere.
skilla:/etc# grep "/etc/motd" * -R3 |more
grep: alternatives/java: No such file or directory
default/rcS-UTC=no
default/rcS-# Set VERBOSE to "no" if you would like a more quiet bootup.
default/rcS-VERBOSE=yes
default/rcS:# Set EDITMOTD to "no" if you don't want /etc/motd to be editted automatically
default/rcS-EDITMOTD=yes
default/rcS-# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
default/rcS-FSCKFIX=no
--
init.d/bootmisc.sh- fi
init.d/bootmisc.sh-
init.d/bootmisc.sh- #
init.d/bootmisc.sh: # Update /etc/motd. If it's a symbolic link, do the actual work
init.d/bootmisc.sh- # in the directory the link points to.
init.d/bootmisc.sh- #
init.d/bootmisc.sh- if [ "$EDITMOTD" != no ]
init.d/bootmisc.sh- then
init.d/bootmisc.sh: MOTD="`readlink -f /etc/motd || :`"
init.d/bootmisc.sh- if [ "$MOTD" != "" ]
init.d/bootmisc.sh- then
init.d/bootmisc.sh- uname -a > $MOTD.tmp
grep: mail/smrsh/mail.local: No such file or directory
--
rcS.d/S55bootmisc.sh- fi
rcS.d/S55bootmisc.sh-
rcS.d/S55bootmisc.sh- #
rcS.d/S55bootmisc.sh: # Update /etc/motd. If it's a symbolic link, do the actual work
rcS.d/S55bootmisc.sh- # in the directory the link points to.
rcS.d/S55bootmisc.sh- #
rcS.d/S55bootmisc.sh- if [ "$EDITMOTD" != no ]
rcS.d/S55bootmisc.sh- then
rcS.d/S55bootmisc.sh: MOTD="`readlink -f /etc/motd || :`"
rcS.d/S55bootmisc.sh- if [ "$MOTD" != "" ]
rcS.d/S55bootmisc.sh- then
rcS.d/S55bootmisc.sh- uname -a > $MOTD.tmp
grep: rcS.d/S35devpts.sh: No such file or directory
nothing interesting until here
now:
Quote:
skilla:/etc# grep "motd" * -R3 |more
grep: alternatives/java: No such file or directory
default/rcS-UTC=no
default/rcS-# Set VERBOSE to "no" if you would like a more quiet bootup.
default/rcS-VERBOSE=yes
default/rcS:# Set EDITMOTD to "no" if you don't want /etc/motd to be editted automatically
default/rcS-EDITMOTD=yes
default/rcS-# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
default/rcS-FSCKFIX=no
--
init.d/bootmisc.sh- fi
init.d/bootmisc.sh-
init.d/bootmisc.sh- #
init.d/bootmisc.sh: # Update /etc/motd. If it's a symbolic link, do the actual work
init.d/bootmisc.sh- # in the directory the link points to.
init.d/bootmisc.sh- #
init.d/bootmisc.sh- if [ "$EDITMOTD" != no ]
init.d/bootmisc.sh- then
init.d/bootmisc.sh: MOTD="`readlink -f /etc/motd || :`"
init.d/bootmisc.sh- if [ "$MOTD" != "" ]
init.d/bootmisc.sh- then
init.d/bootmisc.sh- uname -a > $MOTD.tmp
grep: mail/smrsh/mail.local: No such file or directory
-- pam.d/ssh-@include common-session
pam.d/ssh-
pam.d/ssh-# Print the message of the day upon successful login.
pam.d/ssh:session optional pam_motd.so # [1]
pam.d/ssh-
pam.d/ssh-# Print the status of the user's mailbox upon successful login.
pam.d/ssh-session optional pam_mail.so standard noenv # [1]
--
pam.d/login-# (Replaces the `LASTLOG_ENAB' option from login.defs)
pam.d/login-session optional pam_lastlog.so
pam.d/login-
pam.d/login:# Prints the motd upon succesful login
pam.d/login-# (Replaces the `MOTD_FILE' option in login.defs)
pam.d/login:session optional pam_motd.so
pam.d/login-
pam.d/login-# Prints the status of the user's mailbox upon succesful login
pam.d/login-# (Replaces the `MAIL_CHECK_ENAB' option from login.defs).
--
rcS.d/S55bootmisc.sh- fi
rcS.d/S55bootmisc.sh-
rcS.d/S55bootmisc.sh- #
rcS.d/S55bootmisc.sh: # Update /etc/motd. If it's a symbolic link, do the actual work
--More--grep: rcS.d/S35devpts.sh: No such file or directory
rcS.d/S55bootmisc.sh- # in the directory the link points to.
rcS.d/S55bootmisc.sh- #
rcS.d/S55bootmisc.sh- if [ "$EDITMOTD" != no ]
rcS.d/S55bootmisc.sh- then
rcS.d/S55bootmisc.sh: MOTD="`readlink -f /etc/motd || :`"
rcS.d/S55bootmisc.sh- if [ "$MOTD" != "" ]
rcS.d/S55bootmisc.sh- then
rcS.d/S55bootmisc.sh- uname -a > $MOTD.tmp
The problem must be to italics letters
How can i restart login service / pam.d or something to apply changes to these files?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.