2

I know how to customize the MOTD screen but I dont know how to remove the first line. This is what I did:

  • /etc/motd (customize this file)
  • /etc/ssh/sshd_config: Change the setting PrintLastLog to no, this will disable the "Last login" message.

But how to remove the first line?

enter image description here

2 Answers 2

1

It appears to come from /run/motd.dynamic which is generated by /etc/init.d/motd during boot.

So you could delete /run/motd.dynamic and edit etc/init.d/motd to change

uname -snrvm > /var/run/motd.dynamic

to just

/var/run/motd.dynamic

Of course if the motd package is updated this change might be overwritten.

0
1
  1. Edit /etc/pam.d/login

  2. Comment out (with a # at the beginning of the line) or delete line 85 #session optional pam_exec.so type=open_session stdout /bin/uname -snrvm

  3. save and logout

  4. login.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.