Bug 1663812

Summary: document method to disable motd message
Product: Red Hat Enterprise Linux 8 Reporter: Eko <hsun>
Component: pamAssignee: Tomas Mraz <tmraz>
Status: CLOSED ERRATA QA Contact: Dalibor Pospíšil <dapospis>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.0CC: akjain, dapospis, jbastian, mpitt, ovasik, ptalbert, rjones, stefw, yuefliu
Target Milestone: rcKeywords: ManPageChange, Reopened, Triaged
Target Release: 8.2   
Hardware: All   
OS: Linux   
Fixed In Version: pam-1.3.1-8.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 16:42:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Eko 2019-01-07 07:18:55 UTC
The build is: RHEL-8.0-20181220.1, when login by ssh:

# ssh xxx.xxx.xxx.xxx
root.xxx.xxx's password: 
Activate the web console with: systemctl enable --now cockpit.socket

Last login: Mon Jan  7 14:52:39 2019 from

What's up with that? I've never seen this additional output before.

Comment 1 Martin Pitt 2019-01-07 09:02:21 UTC
This happens on purpose, and explains how to either enable or access (depending on the state) the web console (aka Cockpit). It's a more dynamic variant of the static /etc/issue message that Fedora Server showed.

Comment 2 Eko 2019-01-08 05:29:16 UTC
Sometimes, if I run some command line in the Terminal, this strange message still output and the command line will return non-zero status, even the cockpit.socket status is running.

Any workaround?  

# virsh  dominfo 7.4_Server_x86_64 | grep '^Name'
Activate the web console with: systemctl enable --now cockpit.socket

# echo $?

Comment 3 Jeff Bastian 2019-04-15 16:07:33 UTC
Re-opening since this breaks automation methods like 'expect' scripts.  If you do actually enable the socket, then the message changes to:

Web console: https://FQDN:9090/ or https://IP:9090/

There is also a Fedora equivalent bug 1635200 requesting to stop these messages.

Please provide a method to disable the messages.

Comment 4 Jeff Bastian 2019-04-15 16:14:18 UTC
Removing (or commenting out) the pam_motd.so module from /etc/pam.d/sshd is one method to stop the messages, although it seems like a rather blunt tool.

One can also remove the /etc/issue.d/cockpit.issue and /etc/motd.d/cockpit symlinks, but this is temporary since they will return with the next update to cockpit-ws.

Comment 6 Richard W.M. Jones 2019-10-08 07:34:34 UTC
One fix for this is:

sudo dnf remove cockpit-ws

Comment 9 Martin Pitt 2019-12-18 15:19:21 UTC
The correct way to disable it is "ln -sfn /dev/null /etc/motd.d/cockpit", so that the next cockpit-ws package upgrade doesn't bring back the file.

This is already documented in pam_motd(8) in Fedora 31, in pam-1.3.1-18.fc31:

       To silence a message, a symbolic link with target /dev/null may be placed in /etc/motd.d with the same filename as the message to be silenced. Example:
       Creating a symbolic link as follows silences /usr/lib/motd.d/my_motd.

       ln -s /dev/null /etc/motd.d/my_motd

Unfortunately this part of the manpage is not yet in RHEL 8.2 (pam-1.3.1-5.el8). It should be, so I'm reassigning to PAM.

Comment 15 errata-xmlrpc 2020-04-28 16:42:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.