我想知道在 RHEL 服务器上登录帐户时是否可以显示启动画面?不是通过/etc/motd,因为它是全局的,而是针对特定用户的。
理想情况下,我希望在服务帐户登录时显示正常运行时间和运行的服务。
亲切的问候,
R,
最佳答案
查看 sshd_config
的手册页。有 Banner
选项,您可以为每个用户自定义它。
motd
也可以是动态的。在 ServerFault 上查看此答案:
However, it's possible to execute a shell script at login time that will have the same result. This is usually achieved by adapting the
/etc/profile
script that is executed each time a user logs in. 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.
关于linux - 登录 RHEL 时的自定义启动画面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36649459/