Visit Our UNIX and Linux User Community

Why doesn't motd show up when I su to root?

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Why doesn't motd show up when I su to root?
# 1  
Old 02-28-2013
Why doesn't motd show up when I su to root?

When I do sudo -i isn't that like creating a root login shell session? Why isn't motd displayed? motd=message of the day.

---------- Post updated at 09:54 AM ---------- Previous update was at 09:25 AM ----------

I think I answered it myself, it is only called for remote login sessions, once you're connected, subsequent shells only read /etc/profile.d and ~/bashrc etc... Is that correct?
# 2  
Old 02-28-2013
sudo -i is not actually a system login. /bin/login is not involved, so the motd doesn't happen.

When you login to an actual terminal username prompt, you're talking to /bin/login.
# 3  
Old 02-28-2013
I created one for fun on my prefered server: and it shows up...

On this HP server it is called in /etc/profile ...
   # This is to meet legal requirements...

        cat /etc/copyright

   # Message of the day

        if [ -r /etc/motd ]
                cat /etc/motd


Previous Thread | Next Thread
Test Your Knowledge in Computers #43
Difficulty: Easy
A serial interface transmits two bits of information at the same time, both a one and a zero.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mounted to mac, doesn't show DIR contents on first 'ls'

Hi, I have a cronjob that mounts machines every 15 minutes. sudo mount -t cifs -o username=Ren_user,password=AIB#1109$,nounix,bg,sec=ntlmssp // /mnt/clinical/234mac When I open a new shell and ls /mnt/clinical/234macto the mount point it is blank, but when I do the... (7 Replies)
Discussion started by: jdilts
7 Replies

2. Red Hat

sendmail doesn't work for root

I've created a Perl daemon that needs to send an email when an error/shutdown occurs. I use the Perl Email::Valid module and that uses sendmail. When I run the script as a regular user, the email is sent with no issues. When I run the script as the root user, I get the following message in... (1 Reply)
Discussion started by: OldManEd
1 Replies

3. Emergency UNIX and Linux Support

Grub Doesn't show menu

Hi guys. I have installed Acronis disk director in windows XP and allocate some free space to install Debian beside fedora. after completion i rebooted and now grub is in command line mode and does not show the menu list. (I didn't remove the fedora partition. I just allocate some space from... (1 Reply)
Discussion started by: majid.merkava
1 Replies

4. UNIX for Advanced & Expert Users

Compiling VIM, doesn't show menu and toolbar.

I'm trying to compile vim73 with the Motif Toolkit. ./configure --enable-gui=motif make ./src/vim -g Vim runs in a window, without the standard toolbar and menu bar. I tried to recompile with ./configure --enable-gui=gnome2It compiled with GTK2 toolkit, but still no menubar, nor toolbar.... (0 Replies)
Discussion started by: mghis
0 Replies

5. Homework & Coursework Questions

Command Doesn't Show Description

im making c code in linux and im having problems with one command, id should bring up a list but instead id doesnt do nothing, there are no error's, can anyone solve whats wrong ? void environ() { extern char **environ; int i=0; for (i = 0; environ !=NULL;i++) { ... (1 Reply)
Discussion started by: figureout
1 Replies

6. IP Networking

Traceroute doesn't show gateway as hop

I have a Linux server connected to the Internet like so: Server ( -> /29 VLAN Gateway ( -> Core Router ( -> Internet If I run a traceroute from my server to an arbitrary site on the internet I get a result like this: # traceroute some-other-server... (2 Replies)
Discussion started by: ramnet
2 Replies

7. Solaris

Non-Root mode ... luxadm to show path(s) for Disks

Hi Gurus out there... I am pondering over a situation where I have non-root access (user account), where I am trying to determine paths (including multipaths) on a host. "luxadm display" seems very appropriate, but requires root access. Is there anyway I can get the FC path information? ... (1 Reply)
Discussion started by: verisund
1 Replies

8. UNIX for Dummies Questions & Answers

Have htdocs/site/ show up at root

I have a site, I have a folder where pages are served from, htdocs/ I have a folder containing one site at htdocs/drupal/. I'd like to be able to go to and see the index.php page within the drupal folder, but instead I see a directory listing: drupal phpBB3 ... (9 Replies)
Discussion started by: kumakuma
9 Replies

9. Shell Programming and Scripting

replacing old motd with new motd

I need to replace the current /etc/motd text file with a new motd across 30+ servers. Which is the best way to do this? Shell script? sed? Does anyone have an example I can use? Thanks in advance. Unix people are the best!!! :) (2 Replies)
Discussion started by: antalexi
2 Replies

10. Post Here to Contact Site Administrators and Moderators

My sig doesn't show

Is there an issue with it? (2 Replies)
Discussion started by: Spetnik
2 Replies

Featured Tech Videos