\input{gl2.slide-header-beamer} \errorcontextlines=99 %% Subtopic Number = '1.108.5' %% Title from filename: 'Notify users on system-related issues' %% Weight: 1 %% Description: %% 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 \title{1.108.5\\Notify users on system-related issues\\Weight 1} \author[Geoff Robertson]{Geoffrey Robertson \texttt{ge@ffrey.com} \and Nick Urbanik \texttt{nicku@nicku.org}\\ {\tiny This document Licensed under GPL---see section~\ref{sec:license}}}% \subtitle{Linux Professional Institute Certification --- 102}% \mode
{\chead{1.108.5}}% \begin{document} \maketitle \mode
{\thispagestyle{empty}} \section{Context} \label{sec:context} \begin{frame} \frametitle{Outline} \mode {% %\footnotesize \begin{multicols}{2} \tableofcontents \end{multicols} % You might wish to add the option [pausesections] }% \mode
{% \tableofcontents }% \end{frame} \begin{frame} \frametitle{Topic 108 Documentation [8]}% \framesubtitle{Where we are up to}% \begin{description} \item[1.108.1] Use and Manage Local System Documentation [4] \item[1.108.2] Find Linux Documentation on the Internet [3] % \uline depends on \usepackage[normalem]{ulem}: \item[1.108.5] \textbf{\uline{Notify Users on System Related Issues [1]}} \end{description} \end{frame} %----------------------------------------------------------- \section{Objective} \label{sec:objective} \begin{frame} \frametitle{Description of Objective}% \framesubtitle{1.108.5\ \ Notify users on system-related issues}% \mode{\Large}% 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. \end{frame} \begin{frame}[fragile] \frametitle{Key files, terms, and utilities include:} \mode{\large}% \begin{description} \item[\texttt{/etc/issue}] --- \item[\texttt{/etc/issue.net}] --- File containing message displayed when users log in via \texttt{telnet} (which should be never! \texttt{:-)} \item[\texttt{/etc/motd}] --- Message of the day file: displayed when log in via \texttt{ssh} or the console \end{description} \end{frame} \section{/etc/issue} \label{sec:issue} \begin{frame}[fragile] \frametitle{Customize the Local Login screen with \texttt{/etc/issue}} \begin{itemize} \pause \item The login screen for Fedora Core 4 looks like this: \begin{semiverbatim} Fedora Core release 4 (Stentz) Kernel 2.6.13-1.1526_FC4smp on an i686 login: \end{semiverbatim} \pause \item The \texttt{getty} process spawned by \textsf{init} presents the contents of the file \texttt{/etc/issue} and provides a \texttt{login:} prompt for the user.% \pause% \item The file \texttt{/etc/issue} \begin{semiverbatim} \cmd{cat /etc/issue} Fedora Core release 4 (Stentz) Kernel \textbackslash{}r on an \textbackslash{}m \end{semiverbatim} \end{itemize} \end{frame} \subsection{Manpage for \texttt{issue}} \label{sec:man-issue} \begin{frame}[fragile] \frametitle{{man issue}} {\mode{\scriptsize}\mode
{\footnotesize} \begin{semiverbatim} 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 \textbackslash{}char sequences, if supported by mingetty(1). FILES /etc/issue SEE ALSO mingetty(1), motd(5) Linux 1993-07-24 ISSUE(5) \end{semiverbatim} } \end{frame} \subsection{getty strings you can use in issue} \label{sec:getty-strings-issue} \begin{frame}[fragile] \frametitle{{man getty}---embedded in the \texttt{/etc/issue}} \begin{tabularx}{\linewidth}{@{}>{\ttfamily}lY@{}} \textbackslash{}d & insert current day (localtime),\\ \textbackslash{}l & insert line on which mingetty is running,\\ \textbackslash{}m & inserts machine architecture (\texttt{uname -m}),\\ \textbackslash{}n & inserts machine's network node hostname (\texttt{uname -n}),\\ \textbackslash{}o & inserts domain name,\\ \textbackslash{}r & inserts operating system release (\texttt{uname -r}),\\ \textbackslash{}t & insert current time (localtime),\\ \textbackslash{}s & inserts operating system name,\\ \textbackslash{}u & insert the number of current users logged in\\ \textbackslash{}U & inserts ``1 user'' or ``\meta{n} users'', where \meta{n} is the number of users logged in\\ \textbackslash{}v & inserts operating system version (\texttt{uname~-v}). \end{tabularx} \end{frame} \section{\texttt{telnet} and issue.net} \label{sec:issue.net} \begin{frame}[fragile] \frametitle{Telnet uses \texttt{/etc/issue.net}}% The following sequences are supported by telnetd: \par\bigskip\par \begin{tabularx}{\linewidth}{@{}>{\ttfamily}lY@{}} \%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 `\texttt{\%}' character\\ \end{tabularx} \end{frame} %----------------------------------------------------------- \section{Message of the Day: \texttt{motd}} \label{sec:motd} %============================================================================== %============================================================================== \begin{frame}[fragile] \frametitle{Message of the Day --- \texttt{motd}} \framesubtitle{Login Sequence} \begin{itemize} \pause \item Contents of \texttt{/etc/issue} is displayed. \pause \item \texttt{getty} displays the login prompt. \pause \item \texttt{/bin/login} handles the login process. \begin{itemize} \pause \item User is authorized. \pause \item Contents of \texttt{/etc/motd} is displayed. \pause \item The login shell is executed. \end{itemize} \end{itemize} \end{frame} %----------------------------------------------------------- %============================================================================== \subsection{Manpage for \texttt{motd}} \label{sec:man-motd} %============================================================================== \begin{frame}[fragile] \frametitle{Manpage for \texttt{motd}} {\mode{\scriptsize}\mode
{\footnotesize} \begin{verbatim} 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 successful 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) \end{verbatim} } \end{frame} %----------------------------------------------------------- %============================================================================== \subsection{\texttt{motd} in action} \label{sec:motd-in-action} %============================================================================== \begin{frame}[fragile] \frametitle{\texttt{motd}}% \pause % \overlay{1} \begin{semiverbatim} \cmd{cat /etc/motd} G'day! :-) \cmd{exit} \end{semiverbatim} \hrule% \pause% %\overlay{2} \begin{semiverbatim} Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8 on an i686 marsbar login: \textbf{geoffrey} Password: Last login: Wed Sep 10 22:23:15 on tty2 G'day! :-) You have new mail. $ \end{semiverbatim} \end{frame} %----------------------------------------------------------- \begin{frame}[fragile] \frametitle{It also works with \texttt{ssh}} \begin{semiverbatim} \cmd{ssh nicku.org} Last login: Thu Oct 27 10:51:21 2005 from nicku.org G'day! :-) \cmd{cat /etc/motd} G'day! :-) $ \end{semiverbatim} \end{frame} %============================================================================== \section{Ways of notifying users} \label{sec:ways-of-notifiying-users} %============================================================================== \begin{frame}[fragile] \frametitle{Notify Users of System Related Issues} \begin{description} \item[Login Screen] \texttt{/etc/issue} \pause % \overlay{1} \item[Telnet Login Screen] \texttt{/etc/issue.net} \pause % \overlay{2} \item[Login message] \texttt{/etc/motd} \pause % \overlay{3} \item[wall] Message to all terminals \pause % \overlay{4} \item[talk] Split screen message \pause % \overlay{5} \item[Email] Users list \pause % \overlay{6} \item[Phone] They have a phone \pause % \overlay{7} \item[Visit] They have an office \end{description} \end{frame} \mode {% \begin{frame} \frametitle{Topics Covered} %\footnotesize %\begin{multicols}{2} \tableofcontents[pausesections,pausesubsections] %\end{multicols} % You might wish to add the option [pausesections] \end{frame} } \section{License Of This Document} \label{sec:license} \begin{frame} \frametitle{License Of This Document}% \raggedright% Copyright \copyright\ 2005, 2003 Geoffrey Robertson and Nick Urbanik . \par Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation---either version 2 of the License or (at your option) any later version. \end{frame} \end{document}