Slackware 登录报价如何运作?

Slackware 登录报价如何运作?

我是 Slackware 的新手,我认为这是一个漂亮的发行版。当我使用 ssh 登录它时,它会打印 motd、引用和一行用于通知邮件的信息,如下所示

Linux 3.10.17.
Last login: Thu Oct 23 06:28:08 +0330 2014 on /dev/pts/0.
No mail.

"The other day I put instant coffee in my microwave oven ... I almost
went back in time."
            -- Steven Wright

ahmad@SLKW:/$ 

我想知道报价和邮件消息如何工作以及配置文件在哪里。

谢谢。

答案1

(免责声明:我是 Arch 用户,从未使用过 Slackware。)

打印引号的程序通常称为fortune。它在我使用过的大多数发行版上都可用,但具体的报价集可能会有所不同。在/etc/profile或 脚本中查找/etc/profile.d有关 的提及fortune。根据描述bsd-games包裹:

在 /etc/profile.d/ 中添加对“fortune”的调用,以便用户在登录时收到一条 Fortune 消息。

邮件消息通常由pam_mail,一个PAM插件,但我认为Slackware不使用PAM(Slackware 仍然拒绝包含 PAM 的原因是什么?)。

根据这个 Linux 问题论坛帖子对于 Slackware 14,由于以下命令,还会打印邮件通知/etc/profile

...
# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
 biff y 2> /dev/null
fi
...

相关内容