EternalTerminal icon indicating copy to clipboard operation
EternalTerminal copied to clipboard

Show MOTD on a new ET connection

Open bmuruge opened this issue 3 years ago • 3 comments

After setting up ET server , while login to server from et client it doesn't display login banner,

Please let me know how to set it up. also could you share the list of parameters that we can use in et.cfg.

Thanks Balaji

bmuruge avatar Jun 24 '21 04:06 bmuruge

also issue #257

gklanderman avatar Nov 04 '21 17:11 gklanderman

Here’s a workaround i’m using with bash on ubuntu. probably could be adapted to different shells and different distros.

Appended to .profile:

# run motd under et
if [[ -v ET_VERSION ]]; then
  sudo run-parts /etc/update-motd.d
fi

[note that my login is set up for passwordless sudo and this might be a PITA without that]

pjv avatar Sep 12 '22 14:09 pjv

Thanks for the info @pjv!  I came up with this which so far has worked on recent Debian and CentOS systems:

/etc/profile.d/et.sh:

if [[ -v ET_VERSION ]]; then
        uname -snrvm
        cat /etc/motd
        last -F2 $USER | head -2 | tail -1 | awk '{print "Last login: " substr($0,40,24) " from " substr($0,23,14)}'
fi

It would be nice if the host name was shown (for when plain ssh is used), but in that case last prints 0.0.0.0 for the et logins, which I suppose isn't as useful as the PID of the last et session.

AGI-chandler avatar Apr 02 '24 02:04 AGI-chandler