对本机:
先修改文件 /etc/issue 改为相要显示的内容, 再修改文件 /etc/rc.d/rc.local(
RedHat) 或 /etc/rc.d/rc.S(Slackware) 把下面几句注释掉:
# This will overwrite /etc/issue at every boot. So, make any changes you
# want to make to /etc/issue here or you will lose them when you reboot.
echo "" > /etc/issue
echo "Red Hat linux $R" >> /etc/issue
echo "Kernel $(uname -r) on $a $(uname -m)" >> /etc/issue
cp -f /etc/issue /etc/issue.net
echo >> /etc/issue
不然的话每次重新启动 /etc/issue 都会被更改。
对 telnet 的远地机器:
先把文件 /etc/usr/sbin/in.telnetd 改名,如改为 in.telnetd.exe ,再编一个名
为 in.telnetd 的 shell 脚本, 在显示完需要的内容后再调用 in.telnetd.exe 。如
:
#!/bin/sh
cat /etc/login.banner #需要在登录提示符前显示的内容
echo -n ""
exec /usr/sbin/in.telnetd.exe