[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: motd handling in jessie

Zbigniew Jędrzejewski-Szmek wrote:
> Modern agetty allows escapes in /etc/issue (see section ISSUE ESCAPES
> in agetty(8)) to insert values directly from uname(2) and /usr/lib/os-release.
> It should be plenty enough for the common case of displaying
> the distribution name and kernel version. Something like
>   Kernel \r on an \m (\l)
> is informative and does not require updates, even if more dynamic things like
> IP addresses and such are included. This does not solve the problem for SSH,
> but it is a much nicer approach imho.

That looks really promising.  What would it take to get the default
/etc/issue changed to include all the necessary information to make the
current dynamic motd obsolete?

It looks like base-files owns /etc/issue.  Currently, /etc/issue

Debian GNU/Linux 8 \n \l

This could instead become, for instance:

Debian GNU/Linux 8 \n \l
\s \r \v \m

(I'd use \S in place of the "Debian GNU/Linux 8", but unfortunately it
looks like pam_issue doesn't support \S.)

That would produce something like this:

Debian GNU/Linux 8 hostname tty1
Linux 3.18.0-trunk-amd64 #1 SMP Debian 3.18-1~exp1 (2014-12-11) x86_64

hostname login:

It'd be easy to adjust this if only a subset of that information is
useful.  Bring on the bikeshedding.  However, I'd like to start with the
question of "could we do this?".

Note that if we care about ssh logins showing the same message, we could
easily enough start using pam_issue, in place of or in addition to
the current pam_motd.


- Josh Triplett

Reply to: