I'd like to run a python script when people log in to the server. I thought editing /etc/motd would be the best approach, but since it's only readable file, that won't work.
I found pretty much identical post: Is it possible to put commands in /etc/motd?
What would be the best solution here? I'd like to run a script that shows the overview of the server, so the users would see the status immediately.
This was suggested A useful practice is to put the command you want to be executed in a script named /etc/motd.sh and call this script from /etc/profile, usually at about the end of it.
but received this comment Putting output like a MOTD in your profile is likely to break sftp.
Any solution will do. Thanks in advance