Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Debian: Getting loginmessage two times
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Debian: Getting loginmessage two times

trexostrexos Member
edited January 2014 in General

Hello,

With my LowEndSpirit Debian 7 VPS I have the problem that I get the message of the day always two times:

Linux vserv03 2.6.32-042stab076.8 #1 SMP Tue May 14 20:38:14 MSK 2013 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Jan 13 23:46:50 2014 from x2asdf224e3.dyn.telefonica.de

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

I already checked /etc/motd but it has the correct motd.

Regards,

Comments

  • AnthonySmithAnthonySmith Member, Patron Provider

    I did that to encourage people to open threads on other forums :)

    /me pats self on back.

    Seriously though, I will dig in to the template and see what I messed up tomorrow :)

    Thanked by 1Magiobiwan
  • trexostrexos Member
    edited January 2014

    @AnthonySmith said:
    I did that to encourage people to open threads on other forums :)

    /me pats self on back.

    Seriously though, I will dig in to the template and see what I messed up tomorrow :)

    Hahah was my first thought of course :P I didn't want to annoy you over ticket though.

    Thank you :) FYI it only occurs on Debian 7, Debian 6 works great.

  • This usually happens if both PAM and sshd (via "PrintMotd" parameter in sshd_config) are set to show the motd. I usually (try to) remember setting "PrintMotd no" in /etc/ssh/sshd_config.

  • AnthonySmithAnthonySmith Member, Patron Provider

    @trexos said:
    Hahah was my first thought of course :P I didn't want to annoy you over ticket though.

    I seem to have created the impression with a lot of people that if you open a ticket for any LES service I will come to you house and literally bite you :)

    I really don't mind at all I just dont like getting the "Install XYZ for me" or "I cant connect to 192.168.0.124 with my ftp" etc etc, or as I got the day before yesterday, straight in to the main Inception hosting support, marked high priority and also when the extra steps to make it critical that said "Cant SCP to 192.168.X.X"

    If you read the (Read in full email) and tried to find the answer yourself or it is a service wide issue then open as many tickets as you want :)

  • trexostrexos Member
    edited January 2014

    @rubik said:
    This usually happens if both PAM and sshd (via "PrintMotd" parameter in sshd_config) are set to show the motd. I usually (try to) remember setting "PrintMotd no" in /etc/ssh/sshd_config.

    Port 22
    #Port
    ListenAddress 0.0.0.0
    ListenAddress ::
    
    HostKey /etc/ssh/ssh_host_rsa_key
    HostKey /etc/ssh/ssh_host_dsa_key
    Protocol 2
    Subsystem sftp /usr/lib/openssh/sftp-server
    
    ChallengeResponseAuthentication no
    PermitRootLogin yes
    UsePAM yes
    UsePrivilegeSeparation yes
    

    So I think this is not the issue?

  • Any suggestions?

  • hostnoobhostnoob Member
    edited February 2014

    I think Debian has two MOTD files. /etc/motd and /etc/motd.tail or something like that.

    edit: guess not, but I'm sure I once tried to change MOTD and it printed out what I typed AND something else, that was in some other file (in /etc/ I think)

  • Check here also:

    /etc/pam.d/sshd

    # Print the message of the day upon successful login.
    # This includes a dynamically generated part from /run/motd.dynamic
    # and a static (admin-editable) part from /etc/motd.
    session    optional     pam_motd.so  motd=/run/motd.dynamic noupdate
    session    optional     pam_motd.so # [1]
    
  • @hostnoob said:
    I think Debian has two MOTD files. /etc/motd and /etc/motd.tail or something like that.

    edit: guess not, but I'm sure I once tried to change MOTD and it printed out what I typed AND something else, that was in some other file (in /etc/ I think)

    I don't find a 2nd motd :(

    @Inglar said:
    Check here also:

    /etc/pam.d/sshd

    > # Print the message of the day upon successful login.
    > # This includes a dynamically generated part from /run/motd.dynamic
    > # and a static (admin-editable) part from /etc/motd.
    > session    optional     pam_motd.so  motd=/run/motd.dynamic noupdate
    > session    optional     pam_motd.so # [1]
    > 

    This is exactly what my sshd contains :(

  • @trexos said:
    This is exactly what my sshd contains :(

    did you check /run/motd.dynamic?

  • @hostnoob said:
    did you check /run/motd.dynamic?

    It just contains:
    Linux hostname 2.6.32-042stab076.8 #1 SMP Tue May 14 20:38:14 MSK 2013 x86_64

  • @trexos said:
    This is exactly what my sshd contains :(

    Try to comment those two lines.

  • @Inglar said:
    Try to comment those two lines.

    That fixed the problem! Thanks :)

Sign In or Register to comment.