-4

I want to print message when user login to linux using ssh like this message (welcome Mr john_097968) where john is username and 097968 is UID Number . so how can I do that using links terminal

1

Usually /etc/motd files contents are displayed when one logs into the server. You could add static text to this files which will be displayed on login. If you require dynamic content I recommend using /etc/profile file to set this welcome, since this file will be executed once any user logging into the system. You could just type in echo ${USER} to print the details on to the terminal.

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.