1.108.5 Notify users on system-related issues Weight 1

Linux Professional Institute Certification — 102

Geoffrey Robertson ge@ffrey.com

               Nick Urbanik nicku@nicku.org

2005 July

Description of Objective

Candidates should be able to notify the users about current issues related to the system. This objective includes automating the communication process, e.g. through logon messages.

Key files, terms, and utilities include:

/etc/issue
/etc/issue.net
/etc/motd

Documentation 2.108.1 Use and Manage Local System Documentation 2.108.2 Find Linux Documentation on the Internet 2.108.5

Notify Users on System Related Issues [] Notify Users on System Related Issues

Candidates should be able to notify the users about current issues related to the system. This objective includes automating the communication process, e.g. through logon messages.

\underline{2}

Notify Users on System Related Issues

/etc/issue
/etc/issue.net
/etc/motd

Notify Users on System Related Issues

TBA

Customize the Local Login screen with /etc/issue

• The login screen for RH73 looks like this:

     Red Hat Linux release 7.3 (Valhalla)
     Kernel 2.4.18-3 on an i686
     login:

• The getty process spawned by init presents the contents of the file /etc/issue and provides a login: prompt for the user.

   • The file /etc/issue
     $ cat /etc/issue ↩
     Red Hat Linux release 7.3 (Valhalla)
     Kernel \r on an \m

man issue

 ISSUE(5)                  Linux Programmer's Manual                  ISSUE(5)
 NAME
         issue - pre-login message and identification file
 DESCRIPTION
         The  file  /etc/issue  is  a text file which contains a message or
         system identification to be printed before the login  prompt.   It
         may  contain  various  @char  and \char sequences, if supported by
         getty(1).
 FILES
         /etc/issue

SEE ALSO
getty(1), motd(5)
Linux
1993-07-24                          ISSUE(5)

man getty—embedded in the /etc/issue

\d      insert current day (localtime),
\l      insert line on which mingetty is running,
\m      inserts machine architecture (uname -m),
\n      inserts machine's network node hostname (uname -n),
\o      inserts domain name,
\r      inserts operating system release (uname -r),
\t      insert current time (localtime),
\s      inserts operating system name,
\u      resp. \U the current number of users which are currently
        logged in.  \U inserts "n users", where as \u only inserts "n".
\v      inserts operating system version (uname -v).

Telnet uses /etc/issue.net
The following sequences are supported by telnetd:
     %l      - show the current tty
     %h, %n
             - show the system node name (FQDN)
     %D, %o
             - show the name of the NIS domain
     %d, %t
             - show the current time and date
     %s      - show the name of the operating system
     %m      - show the machine (hardware) type
     %r      - show the operating system release
     %v      - show the operating system version
     %%      - display a single '%' character

Message of the Day—motd

• Contents of /etc/issue is displayed.

• getty displays the login prompt.

• /bin/login handles the login process.

– User is authorized.

– Contents of /etc/motd is displayed.

– The login shell is executed.

Manpage for motd

MOTD(5)                   Linux Programmer's Manual                   MOTD(5)
NAME
motd - message of the day
DESCRIPTION
The  contents  of /etc/motd are displayed by login(1) after a suc
cessful login but just before it executes the login shell.
The abbreviation "motd" stands for "message of the day", and  this
file  has  been  traditionally  used for exactly that (it requires
much less disk space than mail to all users).
FILES
/etc/motd
SEE ALSO
login(1), issue(5)
Linux                               1992-12-29                           MOTD(5)
motd

1

$ cat /etc/motd ↩
Have a nice day :-)
$^D

2

Red Hat Linux release 9 (Shrike)
Kernel 2.4.20-8 on an i686
marsbar login: geoffrey
Password:
Last login: Wed Sep 10 22:23:15 on tty2
Have a nice day :-)
You have new mail.
$

Notify Users of System Related Issues

Login Screen /etc/issue 1

Telnet Login Screen /etc/issue.net 2

Login message /etc/motd 3

\underline{5}

wall Message to all terminals 4 talk Split screen message 5 Email Users list 6 Phone They have a phone 7 Visit They have an office

The End

License Of This Document