% $Header: /cvsroot/lcdp/lpic/general-linux-2/slides/gl2.113.4.slides.tex,v 1.2 2003/12/01 12:26:07 waratah Exp $

\input{gl2.slide-header.tex}

\begin{document}

\begin{slide}
\begin{center}
\LARGE \textsf{-- General Linux 2 -- \\
 }
\LARGE Properly manage the NFS, smb, and nmb daemons \\[2mm]
\large  \textsf{(Linux Professional Institute Certification)}\\[1mm]

\normalsize\end{center}

\vfill

\tiny
Copyright \copyright\ 2003 Angus Lees. 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.

\begin{verbatim}
$Id: gl2.113.4.slides.tex,v 1.2 2003/12/01 12:26:07 waratah Exp $
\end{verbatim}
\end{slide}

\begin{slide}
\slideheading{Properly manage the NFS, smb and nmbs daemons}
\slidesubheading{Objective}

Candidate should know how to mount remote filesystems using NFS,
configure NFS for exporting local filesystems, start, stop, and
restart the NFS server. Install and configure Samba using the included
GUI tools or direct edit of the /etc/smb.conf file (Note: this
deliberately excludes advanced NT domain issues but includes simple
sharing of home directories and printers, as well as correctly setting
the nmbd as a WINS client).

\end{slide}


\begin{slide}
\Slideheading{Properly manage the NFS, smb, and nmb daemons}
\slidesubheading{Key files, terms and utilities}
\begin{alltt}
/etc/exports
/etc/fstab
/etc/smb.conf
\textbf{mount}
\textbf{umount}
\end{alltt}
\end{slide}

\begin{slide}
\Slideheading{Properly manage the NFS, smb, and nmb daemons}
\slidesubheading{Resources}

\textbf{NFS:} \hfill
\url{http://nfs.sourceforge.net/}

\vfill
\textbf{Samba:} \hfill
\url{http://au1.samba.org/samba/docs/}

\end{slide}


\begin{slide}
\slideheading{NFS}
\slidesubheading{About}

\begin{itemize}
\item ``Network File System''

\item Extremely widely used protocol for sharing files between Unix
      machines

\item Built over RPC

\item Almost always uses UDP

\item Unlike alternatives, the NFS protocol is
      \textbf{stateless}---the server can reboot and the client
      carries on

\item NFSv2 is very simple; v3 is an evolution of v2; v4 is complex
      (and stateful)

\end{itemize}
\end{slide}

\begin{slide}
\slideheading{NFS}
\slidesubheading{Client-side usage}

\begin{alltt}
mount -o \textit{options} \textit{server}:/path /mnt_point
\small
# typical /etc/fstab line - see nfs(5)
server:/exports/home /home nfs rw,intr,rsize=8192,wsize=8192
\end{alltt}

\vfill

Some options:
\begin{description}
\item[rsize/wsize] Read/write size
\item[intr] Allow signals to interrupt timed-out operations
\item[soft] Don't retry indefinitely
\end{description}
\end{slide}

\begin{slide}
\slideheading{NFS}
\slidesubheading{Server-side configuration}

\texttt{/etc/exports} controls what gets exported to where

\begin{alltt}
# /etc/exports.  See exports(5)
/home   10.0.128.0/24(rw,no_root_squash)
/cdrom  *(ro,all_squash)
\end{alltt}

\vfill

Information is actually communicated to mountd and kernel NFS server
via \textbf{exportfs}(8)

\textbf{Note:} No whitespace is allowed between client and client
options

(\textbf{showmount}(8) will query this information from a server)
\end{slide}


\begin{slide}
\slideheading{Samba}
\slidesubheading{About}

\begin{itemize}

\item Implementation of Windows networking protocols (SMB/CIFS, NMB)
      for Unix

\item Samba version 3 (just released) gives PDC/BDC functionality, NT4
      domain member support, much improved printing, etc

\item Full suite of tools, including smbd and nmbd daemons, but also
      client tools: smbclient, rpcclient, net, smbstatus, nmblookup,
      smbtar, smbspool, etc
\end{itemize}
\end{slide}

\begin{slide}
\slideheading{Samba}
\slidesubheading{\texttt{smb.conf}}

Configured through \texttt{/etc/samba/smb.conf}

\texttt{win.ini}-esque sections describing shares

\begin{alltt}
[public]
comment = Public files
path = /home/ftp/pub
read only = yes
guest ok = yes
\end{alltt}

Various \%X string substitutions available (see smb.conf(5))
\end{slide}

\begin{slide}
\slideheading{Samba}
\slidesubheading{\texttt{smb.conf} -- Special sections}

\begin{description}
\item[\texttt{[global]}] Global configuration
\item[\texttt{[homes]}] Triggers creation of automatic user home
directory shares
\item[\texttt{[printers]}] Triggers creation of printer shares for
each system printer
\end{description}
\end{slide}


\begin{slide}
\slideheading{Samba}
\slidesubheading{SWAT}

``Samba Web Administration Tool''

Usual install is \url{http://localhost:901/}

Easy to use, links to relevant documentation, etc.

Rewrites smb.conf, loses comments, reorders and destroys hand crafted
include, etc directives.
\end{slide}

\end{document}
