Questions tagged [motd]

A "message of the day" (motd) is a greeting message displayed after a successful login, just before a login shell is executed.

In Unix-like operating systems, the "message of the day" is a feature for sending common messages to all users. The message is shown after a successful login, just before a login shell is executed. Traditionally the motd has been preferred over sending e-mail to all users, as it allows for more efficient delivery, particularly in terms of disk space usage. The motd is usually stored in the file /etc/motd, although some modern Unix-like operating systems, such as certain Linux distributions, have facilities for assembling the motd from a collection of scripts at login.

58 questions
33
votes
5 answers

How to display welcome message in unix?

How can I display the welcome message "welcome panni" every time I log into unix?
panni
  • 369
  • 1
  • 4
  • 5
32
votes
4 answers

Bash .hushlogin, keep last login time and host

At my company, when I log into some servers, my last login and a huge banner are displayed: me@my-laptop$ ssh the-server Last login: Mon Feb 8 18:54:36 2016 from my-laptop.company.com…
Xion345
  • 749
  • 2
  • 6
  • 16
22
votes
3 answers

How do I use colors in the MOTD?

I edited the default /etc/update-motd.d/00-header, adding some color to make it easier to read: printf "Welcome to \e[1;34m%s\e[0m \e[2m(%s %s %s)\e[0m\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)" I can run that line of code…
IQAndreas
  • 10,145
  • 21
  • 59
  • 79
19
votes
3 answers

How to set a dynamic Message of the Day (motd) in Debian Jessie 8.2 for ssh?

I would like to have a dynamic motd, but I can't figure out how to do it. I tried what I found, adding /etc/update-motd.d/00-header, 10-sysinfo, 90-footer, and symlinking to /etc/motd /var/run/motd.dynamic, /run/motd.dynamic, /run/motd or…
batisteo
  • 293
  • 1
  • 2
  • 5
12
votes
4 answers

How to prevent "Last Login:" message from showing up when using sftp?

In Ubuntu GNU/Linux 12.04, I have a user johndoe that is part of an sftponly group, set up to sftp to a chroot jail using Subsystem sftp internal-sftp Match Group sftponly ChrootDirectory %h ForceCommand internal-sftp …
0mid
  • 425
  • 1
  • 4
  • 13
10
votes
2 answers

Can I customize the "You have new mail" message

I'm trying to modify the You have new mail message that is shown below MOTD when you login via SSH. My goal is to make that message more visible (bright color would be great) so it gets my attention when I log in.
JAN261202
  • 103
  • 5
8
votes
3 answers

Motd doesn't show up

I'd like to set a custom motd ("message of the day") on my machine (currently Mac OS X 10.6.5 using Bash with Terminal.app). In /etc/ there was no motd file so I created one with some sample text. But the message doesn't show up when I restart…
Henrik
  • 433
  • 3
  • 11
8
votes
2 answers

/etc/motd is not displayed when a named pipe?

Running Gentoo 3.4.0 Having recently heard about the /etc/motd file, i tried to have it display random cowsay fortunes. I wrote some random bash script to act as a daemon, feeding the /etc/motd as a named pipe, as seen on some forums. I don't think…
Fira
  • 203
  • 1
  • 5
6
votes
3 answers

Motd not changing

My /etc/motd file is showing duplicate messages. When I edit it manual, it keeps returning to the messed up version whenever a user logs in. How do I stop this? I'm using Ubuntu 10.04
MrD
  • 259
  • 1
  • 4
  • 10
4
votes
0 answers

A strange output in welcome message

Days ago I found I cannot connect my server via sftp. Then I found that there is a dot in the welcome message when I login via ssh. .Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.15.0-72-generic x86_64) * Documentation: https://help.ubuntu.com *…
Xingrui
  • 41
  • 2
4
votes
2 answers

Disable SSH MOTD/Banner for a specific user

I have a custom shell in /bin/that returns an echo and exists. I have a user that is exclusively linked to that shell only so that when someone tries to ssh into the server using that user via pubkey only, the custom shell will echo something and…
Viktova
  • 265
  • 1
  • 4
  • 11
4
votes
5 answers

Get default ubuntu motd in fish shell

I would like to have Ubuntu's MOTD in the fish shell. Ubuntu's default is as follows: That is essentially what I would like to see when open up my terminal (terminator, which loads fishfish) As far as I can make out (Based on the information here),…
eggonlegs
  • 154
  • 2
  • 11
4
votes
3 answers

Updating MOTD on login

I've been tinkering with my CentOS server login procedure, I want to have my MOTD update using the linux_logo program. I've already tried doing this in a few ways, but didn't get the desired effect. I have started with this…
Rumbles
  • 220
  • 4
  • 11
4
votes
3 answers

Change motd value in UNIX Operating System

I need to change the value of MOTD using a script but I do not know how I should start. Am attaching sample MOTD.            
batil
  • 311
  • 2
  • 3
  • 12
3
votes
1 answer

lolcat + motd = no colours

I can't get lolcat to show colours in the message of the day (motd). When I run this in the command line, all works fine: exec /usr/games/fortune | /usr/games/cowsay -f moose | /usr/games/lolcat But the same line in /etc/update-motd.d produced…
Mihai Nagy
  • 33
  • 3
1
2 3 4