simple.html   [plain text]


<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 2. No Frills Samba Servers</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.html" title="Samba-3 by Example"><link rel="up" href="index.html" title="Samba-3 by Example"><link rel="previous" href="primer.html" title="Chapter 1. Networking Primer"><link rel="next" href="small.html" title="Chapter 3. Small Office Networking"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 2. No Frills Samba Servers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="primer.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="small.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="simple"></a>Chapter 2. No Frills Samba Servers</h2></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="simple.html#id2510185">Introduction</a></span></dt><dt><span class="sect1"><a href="simple.html#id2510224">Assignment Tasks</a></span></dt><dd><dl><dt><span class="sect2"><a href="simple.html#id2510268">Drafting Office</a></span></dt><dt><span class="sect2"><a href="simple.html#id2511076">Charity Administration Office</a></span></dt><dt><span class="sect2"><a href="simple.html#AccountingOffice">Accounting Office</a></span></dt></dl></dd><dt><span class="sect1"><a href="simple.html#id2514565">Questions and Answers</a></span></dt></dl></div><p>
	Congratulations, you managed to get past the opening chapter. To some, this is where the interesting
	exercises begin. This is the start of the real journey toward the Samba deployment of a lifetime.
	</p><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2510185"></a>Introduction</h2></div></div><div></div></div><p>
	This chapter lays the groundwork for understanding the basics of Samba operation. 
	Instead of a bland technical discussion, each principle is demonstrated by way of a 
	real-world scenario for which a working solution<sup>[<a name="id2510197" href="#ftn.id2510197">2</a>]</sup> is fully described.
	</p><p>
	The practical exercises take you on a journey through a drafting office, a charity administration
	office, and an accounting office. You may choose to apply any or all of these to your own environment.
	</p><p>
	Every assignment case can be implemented far more creatively, but remember that the solutions you
	create are designed to demonstrate a particular solution possibility. With experience, you should
	find much improved solutions compared with those presented here. By the time you complete this book,
	you should aim to be a Samba expert, so do attempt to find better solutions and try them as you work your
	way through the examples.
	</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2510224"></a>Assignment Tasks</h2></div></div><div></div></div><p>
	Each case presented highlights different aspects of Windows networking for which a simple 
	Samba-based solution can be provided. Each has subtly different requirements taken from real-world cases.
	Each is briefly reviewed to cover points of highlight. In each example, instructions are based
	on the assumption that the official Samba Team RPM package has been installed.
	</p><p>
	This chapter has three assignments built around ficticious companies: 
	</p><p>
	</p><div class="itemizedlist"><ul type="disc"><li><p>A drafting office</p></li><li><p>A charity administration office</p></li><li><p>An accounting office</p></li></ul></div><p>
	</p><p>
	Let's get started.
	</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2510268"></a>Drafting Office</h3></div></div><div></div></div><p>
	Our fictitious company is called <span class="emphasis"><em>Abmas Design Inc.</em></span> This is a three-person
	computer-aided design (CAD) business that often has more work than can be handled. The 
	business owner hires contract draftspeople from wherever he can. They bring their own 
	notebook computers into the office. There are four permanent drafting machines. Abmas has a 
	collection of over 10 years of plans that must be available for all draftsmen to reference. 
	Abmas hires the services of an experienced network engineer to update the 
	plans that are stored on a central server one day per month. She knows how to upload 
	plans from each machine. The files available from the server must remain read-only. 
	Anyone should be able to access the plans at any time and without barriers or difficulty.
	</p><p><a class="indexterm" name="id2510295"></a>
	Mr. Bob Jordan has asked you to install the new server as economically as possible. The central
	server has a Pentium-IV 1.6GHz CPU, 768MB RAM, a 20GB IDE boot drive, a 160GB IDE second disk
	to store plans, and a 100-base-T Ethernet card. You have already installed Red Hat Linux 9.0 and
	have upgraded Samba to version 3.0.2 using the RPM package that is provided from the Samba
	<a href="http://www.samba.org" target="_top">FTP</a> sites.
	</p><p><a class="indexterm" name="id2510318"></a>
	The four permanent drafting machines (Microsoft Windows workstations) have attached printers 
	and plotters that are shared on a peer-to-peer basis by any/all network users. The intent 
	is to continue to share printers in this manner. The three permanent staff work together with 
	all contractors to store all new work on one PC. A daily copy is made of the work storage 
	area to another PC for safekeeping.  When the network consultant arrives, the weekly work 
	area is copied to the central server and the files are removed from the main weekly storage 
	machine. The office works best with this arrangement and does not want to change anything. 
	Old habits are too ingrained.
	</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2510351"></a>Dissection and Discussion</h4></div></div><div></div></div><p><a class="indexterm" name="id2510358"></a>
		The requirements for this server installation demand simplicity. An anonymous read-only
		file server adequately meets all needs. The network consultant determines how
		to upload all files from the weekly storage area to the server. This installation should
		focus only on critical aspects of the installation.
		</p><p>
		It is not necessary to have specific users on the server. The site has a method for storing
		all design files (plans). Each plan is stored in a directory that is named YYYYWW<sup>[<a name="id2510382" href="#ftn.id2510382">3</a>]</sup>, where
		YYYY is the year, and WW is the week of the year. This arrangement allows work to be stored
		by week of year to preserve the filing technique the site is familiar with.
		There is another customer directory that is alphabetically listed. At the top level are 26
		directories (A-Z), in each is a second level of directory for the first plus second letter of the name
		(A-Z); inside each is a directory by the customers' name. Inside each directory is a symbolic
		link to each design drawing/plan. This way of storing customer data files permits all
		plans to be located both by customer name, as well as by the date the work was performed, without
		demanding the disk space that would be needed if a duplicate file copy were to be stored. 
		The share containing the plans is called <span class="emphasis"><em>Plans</em></span>.
		</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2510411"></a>Implementation</h4></div></div><div></div></div><p>
		It is assumed that the server is fully installed and ready for installation and 
		configuration of Samba 3.0.2 and any support files needed. All TCP/IP addresses 
		have been hard coded. In our case the IP address of the Samba server is 
		<tt class="constant">192.168.1.1</tt> and the netmask is <tt class="constant">255.255.255.0</tt>. 
		The host name of the server used was <tt class="constant">server</tt>.
		</p><div class="procedure"><p class="title"><b>Procedure 2.1. Samba Server Configuration</b></p><ol type="1"><li><p>
			Download the Samba-3 RPM packages for Red Hat Linux 9.0 from the Samba
			<a href="http://www.samba.org" target="_top">FTP servers.</a>
			</p></li><li><p><a class="indexterm" name="id2510460"></a><a class="indexterm" name="id2510471"></a>
			Install the RPM package as using either the Red Hat Linux preferred GUI
			tool or using the <span><b class="command">rpm</b></span>, as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> rpm -Uvh samba-3.0.2-1.i386.rpm
</pre><p>
			</p></li><li><p>
			Create a mount point for the file system that will be used to store all data files.
			You can create a directory called <tt class="filename">/plans</tt> as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> mkdir /plans
<tt class="prompt">root# </tt> chmod 755 /plans
</pre><p>
			The 755 permissions on this directory (mount point) permit the owner to read, write
			and execute, and the group and everyone else to read and execute only.
			</p><p><a class="indexterm" name="id2510538"></a>
			Use Red Hat Linux system tools (refer to Red Hat instructions for instructions)
			to format the 160GB hard drive with a suitable file system. An Ext3 file system
			is suitable. Configure this drive to automatically mount using the <tt class="filename">/plans</tt>
			directory as the mount point.
			</p></li><li><p>
			Install the <tt class="filename">smb.conf</tt> file shown in <a href="simple.html#draft-smbconf" title="Example 2.1. Drafting Office smb.conf File">???</a> in the
			<tt class="filename">/etc/samba</tt> directory.

</p><div class="example"><a name="draft-smbconf"></a><p class="title"><b>Example 2.1. Drafting Office smb.conf File</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td># Global Parameters</td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[global]</tt></i></td></tr><tr><td><a class="indexterm" name="id2510616"></a><i class="parameter"><tt>
					
				workgroup = MIDEARTH</tt></i></td></tr><tr><td><a class="indexterm" name="id2510631"></a><i class="parameter"><tt>
					
				security = SHARE</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[Plans]</tt></i></td></tr><tr><td><a class="indexterm" name="id2510656"></a><i class="parameter"><tt>
					
				path = /plans</tt></i></td></tr><tr><td><a class="indexterm" name="id2510672"></a><i class="parameter"><tt>
					
				read only = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2510687"></a><i class="parameter"><tt>
					
				guest ok = Yes</tt></i></td></tr></table></div><p>
			</p></li><li><p><a class="indexterm" name="id2510708"></a>
			Verify that the <tt class="filename">/etc/hosts</tt> file contains the following entry:
</p><pre class="screen">
192.168.1.1	server
</pre><p>
			</p></li><li><p><a class="indexterm" name="id2510736"></a><a class="indexterm" name="id2510747"></a>
			<a class="indexterm" name="id2510756"></a>
			Use the standard system tool to start Samba and to configure it to restart
			automatically at every system reboot. For example:
</p><pre class="screen">
<tt class="prompt">root# </tt> chkconfig smb on
<tt class="prompt">root# </tt> /etc/rc.d/init.d/smb restart
</pre><p>
			</p></li></ol></div><div class="procedure"><p class="title"><b>Procedure 2.2. Windows Client Configuration</b></p><ol type="1"><li><p>
			Make certain that all clients are set to the same network address range as
			has been used for the Samba server. For example, one client might have an IP
			address 192.168.1.10.
			</p></li><li><p><a class="indexterm" name="id2510806"></a>
			Ensure that the netmask used on the Windows clients matches that used
			for the Samba server. All clients must have the same netmask. For example,
			255.255.255.0.
			</p></li><li><p><a class="indexterm" name="id2510823"></a>
			Set the workgroup name on all clients to <tt class="constant">MIDEARTH</tt>.
			</p></li><li><p>
			Verify on each client that the machine called <tt class="constant">SERVER</tt>
			is visible in the <span class="guimenu">Network Neighborhood</span>, that it is
			possible to connect to it and see the share <span class="guimenuitem">Plans</span>,
			and that it is possible to open that share to reveal its contents.
			</p></li></ol></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="validate1"></a>Validation</h4></div></div><div></div></div><p><a class="indexterm" name="id2510876"></a>
		The first priority in validating the new Samba configuration should be to check
		that Samba answers on the loop-back interface. Then it is time to check that Samba
		answers its own name correctly. Last, check that a client can connect to the Samba
		server.
		</p><div class="procedure"><ol type="1"><li><p><a class="indexterm" name="id2510897"></a><a class="indexterm" name="id2510905"></a><a class="indexterm" name="id2510913"></a>
			To check the ability to access the <span><b class="command">smbd</b></span> daemon
			services, execute the following:
</p><pre class="screen">
<tt class="prompt">root# </tt> smbclient -L localhost -U%
        Sharename     Type     Comment
        ---------     ----     -------
        Plans         Disk
        IPC$          IPC      IPC Service (Samba 3.0.2)
        ADMIN$        IPC      IPC Service (Samba 3.0.2)

        Server             Comment
        ---------          -------
        SERVER             Samba 3.0.2

        Workgroup          Master
        ---------          --------
        MIDEARTH           SERVER 
</pre><p>
		<a class="indexterm" name="id2510948"></a><a class="indexterm" name="id2510956"></a>
			This indicates that Samba is able to respond on the loopback interface to
			a NULL connection. The <i class="parameter"><tt>-U%</tt></i> means send an empty
			username and an empty password. This command should be repeated after
			Samba has been running for 15 minutes.
			</p></li><li><p>
			Now verify that Samba correctly handles being passed a username
			and password, and that it answers its own name. Execute the following:
</p><pre class="screen">
<tt class="prompt">root# </tt> smbclient -L server -Uroot%password
</pre><p>
			The output should be identical to the previous response. Samba has been
			configured to ignore all usernames given; instead it uses the
			<i class="parameter"><tt>guest account</tt></i> for all connections.
			</p></li><li><p><a class="indexterm" name="id2511011"></a><a class="indexterm" name="id2511019"></a>
			From the Windows 9x/Me client, launch Windows Explorer, 
			<span class="guiicon">[Desktop: right-click] Network Neighborhood</span>+<span class="guimenu">Explore</span>-&gt;<span class="guimenuitem">[Left Panel]  [+] Entire Network</span>-&gt;<span class="guimenuitem">[Left Panel] [+] Server</span>-&gt;<span class="guimenuitem">[Left Panel] [+] Plans</span>. In the right panel you should see the files and directories
			(folders) that are in the <span class="guiicon">Plans</span> share.
			</p></li></ol></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2511076"></a>Charity Administration Office</h3></div></div><div></div></div><p>
	The fictitious charity organization is called <span class="emphasis"><em>Abmas Vision NL</em></span>. This is an
	office that has five networked computers. Staff are all volunteers with frequent staff changes.
	Ms. Amy May, the director of operations, wants a no-hassle network. Anyone should be able to
	use any PC. Only two Windows applications are used: a custom funds tracking and management package
	that stores all files on the central server and Microsoft Word. The office prepares mail-out
	letters, letters of invitation, and thank-you notes. All files must be stored in perpetuity.
	The custom funds tracking and management software has been configured to use a server named
	<tt class="constant">SERVER</tt>, a share named <tt class="constant">FTMFILES</tt>, and a printer queue
	named <tt class="constant">PRINTQ</tt> that uses preprinted stationery, thus demanding a
	dedicated printer. This printer does not need to be mapped to a local printer on the workstations.
	</p><p><a class="indexterm" name="id2511115"></a><a class="indexterm" name="id2511123"></a>
	Printer handling in Samba results in a significant level of confusion. Samba presents to the
	MS Windows client only a print queue. The Samba <span><b class="command">smbd</b></span> process passes a
	print job sent to it from the Windows client to the native UNIX printing system. The native
	UNIX printing system (spooler) places the job in a print queue from which it is
	delivered to the printer. In this book, network diagrams refer to a printer by the name 
	of the print queue that services that printer. It does not matter what the fully qualified 
	name (or the host name) of a network attached printer is. The UNIX print spooler is configured 
	to correctly deliver all jobs to the printer.
	</p><p>
	This organization has a policy forbidding use of privately owned computers on site as a measure
	to prevent leakage of confidential information. Only the five PCs owned by Abmas Vision NL are
	used on this network.
	</p><p><a class="indexterm" name="id2511158"></a>
	The central server was donated by a local computer store. It is a dual processor Pentium-III
	server, has 1GB RAM, a 3-Ware IDE RAID Controller that has 4 x 200GB IDE hard drives, and a
	100-base-T network card. The office has 100-base-T permanent network connections that go to
	a central hub and all equipment is new. The five network computers all are equipped with Microsoft
	Windows Me. Funding is limited, so the server has no operating system on it. You have approval
	to install Samba on Linux, but just make sure it works without problems. There are two HP LaserJet
	5 PS printers that are network connected.  The second printer is to be used for general
	office and letter printing. Your recommendation to allow only the Linux server to print directly
	to the printers was accepted. You have supplied SUSE Enterprise Linux Server version 8.0 and
	have upgraded Samba to version 3.0.2.
	</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2511184"></a>Dissection and Discussion</h4></div></div><div></div></div><p>
	    <a class="indexterm" name="id2511192"></a><a class="indexterm" name="id2511198"></a><a class="indexterm" name="id2511206"></a><a class="indexterm" name="id2511213"></a>
		This installation demands simplicity. Frequent turn-over of volunteer staff would indicate that
		a network environment that requires users to logon might be problematic. It is suggested that the
		best solution for this office would be one where the user can log onto any PC with any username
		and password. Samba can accommodate an office like this by using the <i class="parameter"><tt>force user</tt></i>
		parameter in share and printer definitions. The use of the <i class="parameter"><tt>force user</tt></i>
		ensures that all files are owned by same user identifier (UID) and thus ensures that there
		will never be a problem with file access due to file access permissions. Additionally, you elect
		to use the <i class="parameter"><tt>nt acl support = No</tt></i> option to ensure that no attempts can be
		made to write access control lists (Posix type) to any file or directory. This prevents
		an inadvertent ACL from overriding actual file permissions.
		</p><p>
		<a class="indexterm" name="id2511257"></a>
		<a class="indexterm" name="id2511264"></a>
		<a class="indexterm" name="id2511271"></a>
		This organization is a prime candidate for Share Mode security. The <i class="parameter"><tt>force user</tt></i>
		allows all files to be owned by the same user and group. In addition to this, it would not hurt to
		set SUID and set SGID shared directories. This means that all new files that are created, no matter
		who creates it, are owned by the owner or group of the directory in which they are created.
		For further information regarding the significance of the SUID/SGID settings, see 
		<a href="appendix.html#ch12-SUIDSGID" title="Effect of Setting File and Directory SUID/SGID Permissions Explained">???</a>.
		</p><p>
		<a class="indexterm" name="id2511304"></a>
	    <a class="indexterm" name="id2511311"></a><a class="indexterm" name="id2511319"></a><a class="indexterm" name="id2511327"></a>
		All client workstations print to a print queue on the server. This ensures that print jobs
		continue to print in the event that a user may shut down the workstation immediately after
		sending a job to the printer. Today, both Red Hat Linux and SUSE Linux use CUPS-based printing. 
		Older Linux systems offered a choice to use either the LPRng printing system, or CUPS. It appears, however,
		that CUPS has now become the leading UNIX printing technology.
		</p><p>
		<a class="indexterm" name="id2511347"></a>
		The print queues are set up as <tt class="constant">Raw</tt> devices, which means that CUPS will 
		not do intelligent print processing, and vendor supplied drivers be installed locally on the 
		Windows clients.
		</p><p>
		The hypothetical software (Funds Tracking and Management) referred to is representative of 
		custom-built software that directly uses a NetBIOS interface. Most such software originated in
		the days of MS/PC DOS. NetBIOS names are upper-case (and functionally are case insensitive), 
		thus some old software applications would permit only upper-case names to be entered.
		Some such applications were later ported to MS Windows but retain the upper-case network
		resource naming conventions because customers are familiar with that. We made the decision
		to name shares and print queues for this application in upper-case also for the same reason.
		Nothing would break if you were to use lower-case names, but that decision might create a need
		to re-educate staff  something well avoided at this time.
		</p><p>
		NetBIOS networking does not print directly to a printer. Instead, all printing is done to a
		print queue. The print spooling system is responsible for communicating with the physical
		printer. In this example, therefore, the resource that is referred to as <tt class="constant">PRINTQ</tt>
		really is just a print queue. The name of the print queue is held to be representative of
		the device to which the print spooler delivers print jobs.
		</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2511396"></a>Implementation</h4></div></div><div></div></div><p>
		It is assumed that the server is fully installed and ready for configuration of
		Samba 3.0.2 and for necessary support files. All TCP/IP addresses should be hard coded.
		In our case, the IP address of the Samba server is 192.168.1.1 and the netmask is
		255.255.255.0. The host name of the server used was <tt class="constant">server</tt>.
		The office network is built as shown in <a href="simple.html#charitynet" title="Figure 2.1. Charity Administration Office Network">???</a>.
		</p><div class="figure"><a name="charitynet"></a><p class="title"><b>Figure 2.1. Charity Administration Office Network</b></p><div class="mediaobject"><img src="images/Charity-Network.png" width="356.4" alt="Charity Administration Office Network"></div></div><div class="procedure"><p class="title"><b>Procedure 2.4. Samba Server Configuration</b></p><ol type="1"><li><p><a class="indexterm" name="id2511474"></a>
			Create a group account for office file storage as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> groupadd office
</pre><p>
			</p></li><li><p><a class="indexterm" name="id2511501"></a><a class="indexterm" name="id2511509"></a>
			Create a user account for office file storage as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> useradd -m abmas 
<tt class="prompt">root# </tt> passwd abmas 
Changing password for abmas.
New password: XXXXXXXX
Re-enter new password: XXXXXXXX
Password changed
</pre><p>
			where XXXXXXXX is a secret password.
			</p></li><li><p>
				Use the 3-Ware IDE RAID Controller firmware utilities to configure the four 200GB
				drives as a single RAID level 5 drive, with one drive set aside as the hot spare.
				(Refer to the 3-Ware RAID Controller Manual for the manufacturers' preferred procedure.)
				The resulting drive has a capacity of approximately 500GB of usable space.
				</p></li><li><p><a class="indexterm" name="id2511557"></a>
				Create a mount point for the file system that can be used to store all data files.
				Create a directory called <tt class="filename">/data</tt> as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> mkdir /data
<tt class="prompt">root# </tt> chmod 755 /data
</pre><p>
				The 755 permissions on this directory (mount point) permit the owner to read, write and execute,
				and the group and everyone else to read and execute only.
				</p></li><li><p>
				Use SUSE Linux system tools (refer to the SUSE Administrators Guide for correct
				procedures) to format the partition with a suitable file system. The reiserfs file system
				is suitable. Configure this drive to automount using the <tt class="filename">/data</tt>
				directory as the mount point. It must be mounted before proceeding.
				</p></li><li><p>
				Under the directory called <tt class="filename">/data</tt> create two directories
				named <tt class="filename">ftmfiles</tt> and <tt class="filename">officefiles</tt>, and set
				ownership and permissions as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> mkdir -p /data/{ftmfiles,officefiles/{letters,invitations,misc}}
<tt class="prompt">root# </tt> chown -R abmas.office /data
<tt class="prompt">root# </tt> chmod -R ug+rwxs,o-w,o+rx /data
</pre><p>
				These demonstrate compound operations. The <span><b class="command">mkdir</b></span> command
 				creates in one step these directories:
</p><pre class="programlisting">
/data/fmtfiles
/data/officefiles
/data/officefiles/letters
/data/officefiles/invitations
/data/officefiles/misc
</pre><p>
				The <span><b class="command">chown</b></span> operation sets the owner to the user <tt class="constant">abmas</tt>
				and the group to <tt class="constant">office</tt> on all directories just created. And
				the <span><b class="command">chmod</b></span> operation recursively sets the permissions so that
				the owner and group have SUID/SGID with read/write/execute permission, and everyone else has 
				read and execute permission. This means that all files and directories are created
				with the same owner and group as the directory in which they are created. Any new
				directories created still have the same owner, group, and permissions as the
				directory they are in. This should eliminate all permissions-based file access problems.
				For more information on this subject, refer to <span class="emphasis"><em>TOSHARG</em></span>, Chapter 13, <span class="emphasis"><em>File, Directory
				and Share Access Controls</em></span>, or refer to the UNIX man page for the 
				<span><b class="command">chmod</b></span> and the <span><b class="command">chown</b></span> commands.
				
				</p></li><li><p>
				Install the <tt class="filename">smb.conf</tt> file shown in <a href="simple.html#charity-smbconf" title="Example 2.2. Charity Administration Office smb.conf File">???</a> in the
				<tt class="filename">/etc/samba</tt> directory.
				</p></li><li><p>
				<a class="indexterm" name="id2511764"></a>
				We must ensure that the <span><b class="command">smbd</b></span> can resolve the name of the Samba
				server to its IP address. Verify that the <tt class="filename">/etc/hosts</tt> file
				contains the following entry:
</p><pre class="screen">
192.168.1.1	server
</pre><p>
				</p></li><li><p>
				Configure the printers with the IP address as shown in <a href="simple.html#charitynet" title="Figure 2.1. Charity Administration Office Network">???</a>.
				Follow the instructions in the manufacturers' manual to permit printing to port 9100,
				so that the CUPS spooler can print using raw mode protocols.
				</p></li><li><p><a class="indexterm" name="id2511813"></a>
				Configure the CUPS Print Queues as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> lpadmin -p PRINTQ -v socket://192.168.1.20:9100 -E
<tt class="prompt">root# </tt> lpadmin -p hplj5 -v socket://192.168.1.30:9100 -E
</pre><p>
				This creates the necessary print queues with no assigned print filter.
				</p></li><li><p>
		<a class="indexterm" name="id2511850"></a><a class="indexterm" name="id2511856"></a><a class="indexterm" name="id2511864"></a>
				Edit the file <tt class="filename">/etc/cups/mime.convs</tt> to uncomment the line:
</p><pre class="screen">
application/octet-stream     application/vnd.cups-raw      0     -
</pre><p>
				</p></li><li><p><a class="indexterm" name="id2511892"></a>
				Edit the file <tt class="filename">/etc/cups/mime.types</tt> to uncomment the line:
</p><pre class="screen">
application/octet-stream
</pre><p>
				</p></li><li><p>
				<a class="indexterm" name="id2511921"></a>
				Use the standard system tool to start Samba and CUPS to configure them to restart
				automatically at every system reboot. For example:
				</p><p>
				<a class="indexterm" name="id2511934"></a>
		<a class="indexterm" name="id2511941"></a><a class="indexterm" name="id2511947"></a>
</p><pre class="screen">
<tt class="prompt">root# </tt> chkconfig smb on
<tt class="prompt">root# </tt> chkconfig cups on
<tt class="prompt">root# </tt> /etc/rc.d/init.d/smb restart
<tt class="prompt">root# </tt> /etc/rc.d/init.d/cups restart
</pre><p>
				</p></li></ol></div><div class="example"><a name="charity-smbconf"></a><p class="title"><b>Example 2.2. Charity Administration Office smb.conf File</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td># Global Parameters</td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[global]</tt></i></td></tr><tr><td><a class="indexterm" name="id2512017"></a><i class="parameter"><tt>
					
				workgroup = MIDEARTH</tt></i></td></tr><tr><td><a class="indexterm" name="id2512033"></a><i class="parameter"><tt>
					
				security = SHARE</tt></i></td></tr><tr><td><a class="indexterm" name="id2512048"></a><i class="parameter"><tt>
					
				printing = CUPS</tt></i></td></tr><tr><td><a class="indexterm" name="id2512064"></a><i class="parameter"><tt>
					
				printcap name = CUPS</tt></i></td></tr><tr><td><a class="indexterm" name="id2512080"></a><i class="parameter"><tt>
					
				disable spoolss = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2512096"></a><i class="parameter"><tt>
					
				show add printer wizard = No</tt></i></td></tr><tr><td><a class="indexterm" name="id2512112"></a><i class="parameter"><tt>
					
				wins support = yes</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[FTMFILES]</tt></i></td></tr><tr><td><a class="indexterm" name="id2512137"></a><i class="parameter"><tt>
					
				comment = Funds Tracking &amp; Management Files</tt></i></td></tr><tr><td><a class="indexterm" name="id2512154"></a><i class="parameter"><tt>
					
				path = /data/ftmfiles</tt></i></td></tr><tr><td><a class="indexterm" name="id2512169"></a><i class="parameter"><tt>
					
				read only = No</tt></i></td></tr><tr><td><a class="indexterm" name="id2512185"></a><i class="parameter"><tt>
					
				force user = abmas</tt></i></td></tr><tr><td><a class="indexterm" name="id2512201"></a><i class="parameter"><tt>
					
				force group = office</tt></i></td></tr><tr><td><a class="indexterm" name="id2512216"></a><i class="parameter"><tt>
					
				guest ok = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2512232"></a><i class="parameter"><tt>
					
				nt acl support = No</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[office]</tt></i></td></tr><tr><td><a class="indexterm" name="id2512257"></a><i class="parameter"><tt>
					
				comment = General Office Files</tt></i></td></tr><tr><td><a class="indexterm" name="id2512272"></a><i class="parameter"><tt>
					
				path = /data/officefiles</tt></i></td></tr><tr><td><a class="indexterm" name="id2512288"></a><i class="parameter"><tt>
					
				read only = No</tt></i></td></tr><tr><td><a class="indexterm" name="id2512303"></a><i class="parameter"><tt>
					
				force user = abmas</tt></i></td></tr><tr><td><a class="indexterm" name="id2512319"></a><i class="parameter"><tt>
					
				force group = office</tt></i></td></tr><tr><td><a class="indexterm" name="id2512334"></a><i class="parameter"><tt>
					
				guest ok = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2512350"></a><i class="parameter"><tt>
					
				nt acl support = No</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[printers]</tt></i></td></tr><tr><td><a class="indexterm" name="id2512375"></a><i class="parameter"><tt>
					
				comment = Print Temporary Spool Configuration</tt></i></td></tr><tr><td><a class="indexterm" name="id2512391"></a><i class="parameter"><tt>
					
				path = /var/spool/samba</tt></i></td></tr><tr><td><a class="indexterm" name="id2512407"></a><i class="parameter"><tt>
					
				printable = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2512422"></a><i class="parameter"><tt>
					
				guest ok = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2512438"></a><i class="parameter"><tt>
					
				use client driver = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2512454"></a><i class="parameter"><tt>
					
				browseable = No</tt></i></td></tr></table></div><div class="procedure"><p class="title"><b>Procedure 2.5. Windows Client Configuration</b></p><ol type="1"><li><p>
				Configure clients to the network settings shown in <a href="simple.html#charitynet" title="Figure 2.1. Charity Administration Office Network">???</a>.
				</p></li><li><p>
				Ensure that the netmask used on the Windows clients matches that used
				for the Samba server. All clients must have the same netmask. For example,
				<tt class="constant">255.255.255.0</tt>.
				</p></li><li><p>
				<a class="indexterm" name="id2512507"></a>
				On all Windows clients, set the WINS Server address to <tt class="constant">192.168.1.1</tt>,
				the IP address of the server.
				</p></li><li><p>
				Set the workgroup name on all clients to <tt class="constant">MIDEARTH</tt>.
				</p></li><li><p><a class="indexterm" name="id2512536"></a>
				Install the &#8220;<span class="quote"><span class="emphasis"><em>Client for Microsoft Networks.</em></span></span>&#8221; Ensure that the only option
				enabled in its properties is the option &#8220;<span class="quote"><span class="emphasis"><em>Logon and restore network connections.</em></span></span>&#8221;
				</p></li><li><p>
				Click <span class="guibutton">OK</span> when you are prompted to reboot the system. Reboot the
				system, then logon using any user name and password you choose.
				</p></li><li><p><a class="indexterm" name="id2512577"></a>
				Verify on each client that the machine called <tt class="constant">SERVER</tt>
				is visible in <span class="guimenu">My Network Places</span>, that it is
				possible to connect to it and see the share <span class="guimenuitem">office</span>,
				and that it is possible to open that share to reveal its contents.
				</p></li><li><p><a class="indexterm" name="id2512610"></a><a class="indexterm" name="id2512618"></a>
				Disable password caching on all Windows 9x/Me machines using the registry change file
				shown in <a href="simple.html#MEreg" title="Example 2.3. Windows Me  Registry Edit File: Disable Password Caching">???</a>. Be sure to remove all files that have the
				<tt class="filename">PWL</tt> extension that are in the <tt class="filename">C:\WINDOWS</tt>
				directory.
</p><div class="example"><a name="MEreg"></a><p class="title"><b>Example 2.3. Windows Me  Registry Edit File: Disable Password Caching</b></p><pre class="screen">
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
	Windows\CurrrentVersion\Policies\Network]
	"DisablePwdCaching"=dword:00000001
</pre></div><p>
				The best way to apply this is to save the patch in a file called 
				<tt class="filename">ME-dpwc.reg</tt> and then execute:
</p><pre class="screen">
C:\WINDOWS: regedit ME-dpwc.reg
</pre><p>
				</p></li><li><p>
				Instruct all users to log onto the workstation using a name of their own
				choosing, with a password of their own choosing. The Samba server has been
				configured to ignore the username and password given.
				</p></li><li><p>
				On each Windows Me workstation, configure a network drive mapping to drive <tt class="filename">G:</tt>
				that redirects to the uniform naming convention (UNC) resource 
				<tt class="filename">\\server\officefiles</tt>. Make this a permanent drive connection as follows:
					</p><div class="procedure"><ol type="1"><li><p>
							<span class="guimenu">(Right-click) My Network</span>-&gt;<span class="guimenuitem">Map Network Drive...</span>
						</p></li><li><p>
						In the box labeled &#8220;<span class="quote"><span class="emphasis"><em>Drive:</em></span></span>&#8221;, type G.
						</p></li><li><p>
						In the box labeled &#8220;<span class="quote"><span class="emphasis"><em>Path:</em></span></span>&#8221;, enter 
						<tt class="filename">\\server\officefiles</tt>.
						</p></li><li><p>
						Click <span class="guimenuitem">Reconnect at logon</span>.
						Click <span class="guibutton">OK</span>.
						</p></li></ol></div><p>
				</p></li><li><p>
				On each workstation, install the Funds Tracking and Management software following the
				manufacturer's instructions.
					</p><div class="procedure"><ol type="1"><li><p>
					During installation, you are prompted for the name of the Windows 98
					server. Enter the name <tt class="constant">SERVER</tt>.
					</p></li><li><p>
					You are prompted for the name of the data share.
					The prompt defaults to <tt class="constant">FTMFILES</tt>. Press enter to accept the default value.
					</p></li><li><p>
					You are now prompted for the print queue name. The default prompt is the name of
					the server you entered (<tt class="constant">SERVER</tt> as follows:
					<tt class="constant">\\SERVER\PRINTQ</tt>). Simply accept the default and press enter to
					continue. The software now completes the installation.
					</p></li></ol></div><p>
				</p></li><li><p>
				Install an office automation software package of the customer's choice. Either Microsoft
				Office 2003 Standard or OpenOffice 1.1.0 suffices for any functions the office may
				need to perform. Repeat this on each workstation.
				</p></li><li><p>
				Install a printer on each using the following steps:

					</p><div class="procedure"><ol type="1"><li><p>
						Click <span class="guimenu">Start</span>-&gt;<span class="guimenuitem">Settings</span>-&gt;<span class="guimenuitem">Printers</span>+<span class="guiicon">Add Printer</span>+<span class="guibutton">Next</span>. Do not click <span class="guimenuitem">Network printer</span>.
							Ensure that <span class="guimenuitem">Local printer</span> is selected.
						</p></li><li><p>
						Click <span class="guibutton">Next</span>. In the panel labeled
						<span class="guimenuitem">Manufacturer:</span>, select <tt class="constant">HP</tt>.
						In the <span class="guimenuitem">Printers:</span> panel, select the printer called
						<tt class="constant">HP LaserJet 5/5M Postscript</tt>. Click <span class="guibutton">Next</span>.
						</p></li><li><p>
						In the panel labeled <span class="guimenuitem">Available ports:</span>, select
						<tt class="constant">FILE:</tt>. Accept the default printer name by clicking
						<span class="guibutton">Next</span>. When asked, &#8220;<span class="quote"><span class="emphasis"><em>Would you like to print a
						test page?</em></span></span>&#8221;, click <span class="guimenuitem">No</span>. Click
						<span class="guibutton">Finish</span>.
						</p></li><li><p>
						You may be prompted for the name of a file to print to. If so, close the
						dialog panel. Right-click <span class="guiicon">HP LaserJet 5/5M Postscript</span>-&gt;<span class="guimenuitem">Properties</span>.
						</p></li><li><p>
						In the panel labeled <span class="guimenuitem">Network</span>, enter the name of
						the print queue on the Samba server as follows: <tt class="constant">\\SERVER\hplj5</tt>.
						Click <span class="guibutton">OK</span>+<span class="guibutton">OK</span> to complete the installation.
						</p></li><li><p>
						It is a good idea to test the functionality of the complete installation before
						handing the newly configured network over to the Charity Administration Office
						for production use.
						</p></li></ol></div><p>

				</p></li></ol></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2513087"></a>Validation</h4></div></div><div></div></div><p>
		Use the same validation process as was followed in <a href="simple.html#validate1" title="Validation">???</a>.
		</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="AccountingOffice"></a>Accounting Office</h3></div></div><div></div></div><p>
	The office of Abmas Accounting Inc. is a 40-year-old family-run business. There are nine permanent
	computer users. The network clients were upgraded two years ago. All computers run Windows 2000
	Professional. This year the server will be upgraded from an old Windows NT4 server (actually
	running Windows NT4 Workstation, which worked fine as there were fewer than 10 users) that has
	run in workgroup (Stand-Alone) mode, to a new Linux server running Samba.
	</p><p>
	The office does not want a Domain Server. Mr. Alan Meany wants to keep the Windows 2000 Professional
	clients running as workgroup machines so that any staff member can take a machine home and keep 
	working.  It has worked well so far and your task is to replace the old server. All users have 
	their own workstation logon (you configured it that way when the machines were installed). 
	Mr. Meany wants the new system to operate the same way as the old Windows NT4 server  users 
	cannot access each others' files, but he can access everyone's files. Each person's work files are 
	in a separate share on the server. Users logon to their Windows workstation with their username 
	and enter an assigned password; they do not need to enter a password when accessing their files 
	on the server.
	</p><p><a class="indexterm" name="id2513147"></a>
	The new server will run Red Hat Linux 9.0. You should install Samba-3.0.2 and 
	copy all files off the old system to the new one. The existing Windows NT4 server has a parallel
	port HP LaserJet 4 printer that is shared by all. The printer driver is installed on each
	workstation. You must not change anything on the workstations. Mr. Meany gave instructions to
	replace the server &#8220;<span class="quote"><span class="emphasis"><em>but leave everything else alone to avoid staff unrest.</em></span></span>&#8221;
	</p><p>
	You have tried to educate Mr. Meany and found that he has no interest to understand networking.
	He believes that Windows for Workgroups 3.11 was &#8220;<span class="quote"><span class="emphasis"><em>the best server Microsoft ever sold
	</em></span></span>&#8221; and that Windows NT and 2000 are &#8220;<span class="quote"><span class="emphasis"><em>too fang-dangled complex!</em></span></span>&#8221;
	</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2513185"></a>Dissection and Discussion</h4></div></div><div></div></div><p>
			<a class="indexterm" name="id2513193"></a>
			The requirements of this network installation are not unusual. The staff are not interested in the
			details of networking. Passwords are never changed. In this example solution, we demonstrate the use
			of User Mode security in a simple context. Directories should be set SGID to ensure that members
			of a common group can access the contents. Each user has his or her own share to which only they
			can connect. Mr. Meany's share will be a top level directory above the share point for each employee.
			Mr. Meany is a member of the same group as his staff and is able to access their work files.
			The well used HP LaserJet 4 is available as a service called <tt class="constant">hplj</tt>.
			</p><p>
			You have finished configuring the new hardware and have just completed installation of Red Hat Linux
			9.0. Roll up your sleeves and let's get to work.
			</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="AcctgNet"></a>Implementation</h4></div></div><div></div></div><p>
		The workstations have fixed IP addresses. The old server runs Windows NT4 Workstation, so it 
		cannot be running as a WINS server. It is best that the new configuration preserves the same
		configuration. The office does not use Internet access, so security really is not an issue.
		</p><p>
		The core information regarding the users, their passwords, the directory share point, and the
		share name is given in <a href="simple.html#acctingnet" title="Table 2.1. Accounting Office Network Information">???</a>. The overall network topology is shown in
		<a href="simple.html#acctingnet2" title="Figure 2.2. Accounting Office Network Topology">???</a>. All machines have been configured as indicated prior to the
		start of Samba configuration. The following prescriptive steps may now commence.
		</p><div class="figure"><a name="acctingnet2"></a><p class="title"><b>Figure 2.2. Accounting Office Network Topology</b></p><div class="mediaobject"><img src="images/AccountingNetwork.png" width="356.4" alt="Accounting Office Network Topology"></div></div><div class="table"><a name="acctingnet"></a><p class="title"><b>Table 2.1. Accounting Office Network Information</b></p><table summary="Accounting Office Network Information" border="1"><colgroup><col align="left"><col align="left"><col align="left"><col align="left"><col align="left"><col align="left"></colgroup><thead><tr><th align="left">User</th><th align="left">Login-ID</th><th align="left">Password</th><th align="left">Share Name</th><th align="left">Directory</th><th align="left">Wkst</th></tr></thead><tbody><tr><td align="left">Alan Meany</td><td align="left">alan</td><td align="left">alm1961</td><td align="left">alan</td><td align="left">/data</td><td align="left">PC1</td></tr><tr><td align="left">James Meany</td><td align="left">james</td><td align="left">jimm1962</td><td align="left">james</td><td align="left">/data/james</td><td align="left">PC2</td></tr><tr><td align="left">Jeannie Meany</td><td align="left">jeannie</td><td align="left">jema1965</td><td align="left">jeannie</td><td align="left">/data/jeannie</td><td align="left">PC3</td></tr><tr><td align="left">Suzy Millicent</td><td align="left">suzy</td><td align="left">suzy1967</td><td align="left">suzy</td><td align="left">/data/suzy</td><td align="left">PC4</td></tr><tr><td align="left">Ursula Jenning</td><td align="left">ujen</td><td align="left">ujen1974</td><td align="left">ursula</td><td align="left">/data/ursula</td><td align="left">PC5</td></tr><tr><td align="left">Peter Pan</td><td align="left">peter</td><td align="left">pete1984</td><td align="left">peter</td><td align="left">/data/peter</td><td align="left">PC6</td></tr><tr><td align="left">Dale Roland</td><td align="left">dale</td><td align="left">dale1986</td><td align="left">dale</td><td align="left">/data/dale</td><td align="left">PC7</td></tr><tr><td align="left">Bertrand E Paoletti</td><td align="left">eric</td><td align="left">eric1993</td><td align="left">eric</td><td align="left">/data/eric</td><td align="left">PC8</td></tr><tr><td align="left">Russell Lewis</td><td align="left">russ</td><td align="left">russ2001</td><td align="left">russell</td><td align="left">/data/russell</td><td align="left">PC9</td></tr></tbody></table></div><div class="procedure"><p class="title"><b>Procedure 2.9. Migration from Windows NT4 Workstation System to Samba-3</b></p><ol type="1"><li><p><a class="indexterm" name="id2513609"></a>
			Rename the old server from <tt class="constant">CASHPOOL</tt> to <tt class="constant">STABLE</tt>
			by logging onto the console as the <tt class="constant">Administrator</tt>. Restart the machine
			following system prompts.
			</p></li><li><p>
			Name the new server <tt class="constant">CASHPOOL</tt> using the standard configuration method.
			Restart the machine following system prompts.
			</p></li><li><p>
			Install the latest Samba-3 binary Red Hat Linux RPM that is available from the
			Samba FTP site.
			</p></li><li><p><a class="indexterm" name="id2513657"></a><a class="indexterm" name="id2513665"></a>
			Add a group account for the office to use. Execute the following:
</p><pre class="screen">
<tt class="prompt">root# </tt> groupadd accts
</pre><p>
			</p></li><li><p>
			Install the <tt class="filename">smb.conf</tt> file shown<sup>[<a name="id2513700" href="#ftn.id2513700">4</a>]</sup> 
			in <a href="simple.html#acctconf" title="Example 2.4. Accounting Office Network smb.conf File">???</a>.
			</p></li><li><p><a class="indexterm" name="id2513737"></a><a class="indexterm" name="id2513745"></a><a class="indexterm" name="id2513753"></a>
			For each user who uses this system (see <a href="simple.html#acctingnet" title="Table 2.1. Accounting Office Network Information">???</a>),
			execute the following:
</p><pre class="screen">
<tt class="prompt">root# </tt> useradd -m -G accts -c "Name of User" "LoginID"
<tt class="prompt">root# </tt> passwd "LoginID"
Changing password for user "LoginID"
New Password: XXXXXXXXX	&lt;-- the password from the table
Retype new password: XXXXXXXXX
<tt class="prompt">root# </tt> smbpasswd -a "LoginID"
New SMB password: XXXXXXXXX &lt;-- the password from the table
Retype new SMB password: XXXXXXXXX
Added user "LoginID"
</pre><p>
			</p></li><li><p><a class="indexterm" name="id2513807"></a>
			Create the directory structure for the file shares by executing the following:
</p><pre class="screen">
<tt class="prompt">root# </tt> mkdir -p /data
<tt class="prompt">root# </tt> chown alan /data
<tt class="prompt">root# </tt> for i in james suzy ursula peter dale eric jeannie russell
&gt; do
&gt; 	mkdir -p /data/$i
&gt; 	chown $i /data/$i
&gt; done
<tt class="prompt">root# </tt> chgrp -R accts /data
<tt class="prompt">root# </tt> chmod -R ug+rwxs,o-r+x /data
</pre><p>
			The data storage structure is now prepared for use.
			</p></li><li><p><a class="indexterm" name="id2513863"></a>
			Configure the CUPS Print Queues as follows:
</p><pre class="screen">
<tt class="prompt">root# </tt> lpadmin -p hplj -v parallel:/dev/lp0 -E
</pre><p>
			This creates the necessary print queues with no assigned print filter.
			</p></li><li><p>
		<a class="indexterm" name="id2513893"></a><a class="indexterm" name="id2513898"></a>
			Edit the file <tt class="filename">/etc/cups/mime.convs</tt> to uncomment the line:
</p><pre class="screen">
application/octet-stream     application/vnd.cups-raw      0     -
</pre><p>
			</p></li><li><p><a class="indexterm" name="id2513927"></a><a class="indexterm" name="id2513935"></a>
			Edit the file <tt class="filename">/etc/cups/mime.types</tt> to uncomment the line:
</p><pre class="screen">
application/octet-stream
</pre><p>
			</p></li><li><p>
			<a class="indexterm" name="id2513964"></a>
			Use the standard system tool to start Samba and CUPS to configure them to restart
			automatically at every system reboot. For example:
			</p><p>
			<a class="indexterm" name="id2513977"></a>
		<a class="indexterm" name="id2513984"></a><a class="indexterm" name="id2513989"></a>
</p><pre class="screen">
<tt class="prompt">root# </tt> chkconfig smb on
<tt class="prompt">root# </tt> chkconfig cups on
<tt class="prompt">root# </tt> /etc/rc.d/init.d/smb restart
<tt class="prompt">root# </tt> /etc/rc.d/init.d/cups restart
</pre><p>
			</p></li><li><p>
			On Alan's workstation, use Windows explorer to migrate the files from the old server
			to the new server. The new server should appear in the <span class="guimenu">Network Neighborhood</span>
			with the name of the old server (<tt class="constant">CASHPOOL</tt>).

				</p><div class="procedure"><ol type="1"><li><p>
					Logon to Alan's workstation as the user <tt class="constant">alan</tt>.
					</p></li><li><p>
					Launch a second instance of Windows explorer and navigate to the share called
					<span class="guiicon">files</span> on the server called <span class="guimenu">STABLE</span>.
					</p></li><li><p>
					Click in the right panel, and press <span class="guimenu">Ctrl-A</span> to select all files and
					directories. Press <span class="guimenu">Ctrl-C</span> to instruct Windows that you wish to
					copy all selected items.
					</p></li><li><p>
					Launch the Windows explorer, and navigate to the share called <span class="guiicon">files</span>
					on the server called <span class="guimenu">CASHPOOL</span>. Click in the right panel, and then press
					<span class="guimenu">Ctrl-V</span> to commence the copying process.
					</p></li></ol></div><p>
			</p></li><li><p>
			Verify that the files are being copied correctly from the Windows NT4 machine to the Samba-3 server.
			This is best done on the Samba-3 server. Check the contents of the directory tree under 
			<tt class="filename">/data</tt>. This can be done by executing the following command:
</p><pre class="screen">
<tt class="prompt">root# </tt> ls -aR /data
</pre><p>
			Make certain to check the ownership and permissions on all files. If in doubt, execute the following:
</p><pre class="screen">
<tt class="prompt">root# </tt> chown alan /data
<tt class="prompt">root# </tt> for i in james suzy ursula peter dale eric jeannie russell
&gt; do
&gt; 	chown $i /data/$i
&gt; done
<tt class="prompt">root# </tt> chgrp -R accts /data
<tt class="prompt">root# </tt> chmod -R ug+rwxs,o-r+x /data
</pre><p>
			</p></li><li><p>
			The migration of all data should now be complete. It is time to validate the installation.
			For this, you should make sure all applications, including printing, work before asking the
			customer to test drive the new network.
			</p></li></ol></div><div class="example"><a name="acctconf"></a><p class="title"><b>Example 2.4. Accounting Office Network smb.conf File</b></p><table class="simplelist" border="0" summary="Simple list"><tr><td># Global parameters</td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[global]</tt></i></td></tr><tr><td><a class="indexterm" name="id2514236"></a><i class="parameter"><tt>
					
				workgroup = BILLMORE</tt></i></td></tr><tr><td><a class="indexterm" name="id2514252"></a><i class="parameter"><tt>
					
				printing = CUPS</tt></i></td></tr><tr><td><a class="indexterm" name="id2514267"></a><i class="parameter"><tt>
					
				printcap name = CUPS</tt></i></td></tr><tr><td><a class="indexterm" name="id2514283"></a><i class="parameter"><tt>
					
				disable spoolss = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2514299"></a><i class="parameter"><tt>
					
				show add printer wizard = No</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[files]</tt></i></td></tr><tr><td><a class="indexterm" name="id2514324"></a><i class="parameter"><tt>
					
				comment = Work area files</tt></i></td></tr><tr><td><a class="indexterm" name="id2514340"></a><i class="parameter"><tt>
					
				path = /data/%U</tt></i></td></tr><tr><td><a class="indexterm" name="id2514356"></a><i class="parameter"><tt>
					
				valid users = %S</tt></i></td></tr><tr><td><a class="indexterm" name="id2514371"></a><i class="parameter"><tt>
					
				read only = No</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[master]</tt></i></td></tr><tr><td><a class="indexterm" name="id2514396"></a><i class="parameter"><tt>
					
				comment = Master work area files</tt></i></td></tr><tr><td><a class="indexterm" name="id2514412"></a><i class="parameter"><tt>
					
				path = /data</tt></i></td></tr><tr><td><a class="indexterm" name="id2514427"></a><i class="parameter"><tt>
					
				valid users = alan</tt></i></td></tr><tr><td><a class="indexterm" name="id2514443"></a><i class="parameter"><tt>
					
				read only = No</tt></i></td></tr><tr><td> </td></tr><tr><td><i class="parameter"><tt>[printers]</tt></i></td></tr><tr><td><a class="indexterm" name="id2514467"></a><i class="parameter"><tt>
					
				comment = Print Temporary Spool Configuration</tt></i></td></tr><tr><td><a class="indexterm" name="id2514484"></a><i class="parameter"><tt>
					
				path = /var/spool/samba</tt></i></td></tr><tr><td><a class="indexterm" name="id2514499"></a><i class="parameter"><tt>
					
				printable = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2514515"></a><i class="parameter"><tt>
					
				guest ok = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2514531"></a><i class="parameter"><tt>
					
				use client driver = Yes</tt></i></td></tr><tr><td><a class="indexterm" name="id2514546"></a><i class="parameter"><tt>
					
				browseable = No</tt></i></td></tr></table></div></div></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2514565"></a>Questions and Answers</h2></div></div><div></div></div><p>
	The following questions and answers draw from the examples in this chapter.
	Many design decisions are impacted by the configurations chosen. The intent
	is to expose some of the hidden implications.
	</p><div class="qandaset"><dl><dt> <a href="simple.html#id2514584">
		What makes an anonymous Samba server more simple than an non-anonymous Samba server?
		</a></dt><dt> <a href="simple.html#id2514610">
		How is the operation of the parameter force user different from
		setting the root directory of the share SUID?
		</a></dt><dt> <a href="simple.html#id2514664">
		When would you use both the per share parameter force user as well
		as setting the share root directory SUID?
		</a></dt><dt> <a href="simple.html#id2514691">
		What is better about CUPS printing than LPRng printing?
		</a></dt><dt> <a href="simple.html#id2514746">
		When should Windows client IP addresses be hard coded?
		</a></dt><dt> <a href="simple.html#id2514772">
		Under what circumstances would it be best to use a DHCP server?
		</a></dt><dt> <a href="simple.html#id2514811">
		What is the purpose of setting the parameter guest ok on a share?
		</a></dt><dt> <a href="simple.html#id2514837">
		When would you set the global parameter disable spoolss?
		</a></dt><dt> <a href="simple.html#id2514912">
		Why would you disable password caching on Windows 9x/Me clients?
		</a></dt><dt> <a href="simple.html#id2514936">
		The example of Abmas Accounting Inc. uses User Mode security. How does this provide anonymous access?
		</a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="id2514584"></a><a name="id2514586"></a><b></b></td><td align="left" valign="top"><p>
		What makes an anonymous Samba server more simple than an non-anonymous Samba server?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		In the anonymous server, the only account used is the <tt class="constant">guest</tt> account.
		In a non-anonymous configuration, it is necessary to add real user accounts to both the
		UNIX system and to the Samba configuration. Non-anonymous servers require additional
		administration.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514610"></a><a name="id2514612"></a><b></b></td><td align="left" valign="top"><p>
		How is the operation of the parameter <i class="parameter"><tt>force user</tt></i> different from
		setting the root directory of the share SUID?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		The parameter <i class="parameter"><tt>force user</tt></i> causes all operations on the share to assume the UID
		of the forced user. The new default GID that applies is the primary GID of the forced user.
		This gives all users of this resource the actual privilege of the forced user.
		</p><p>
		When a directory is set SUID, the operating system forces files that are written within it
		to be owned by the owner of the directory. While this happens, the user who is using the share
		has only the level of privilege he or she is assigned within the operating system context.
		</p><p>
		The parameter <i class="parameter"><tt>force user</tt></i> has potential security implications that go
		beyond the actual share root directory. Be careful and wary of using this parameter.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514664"></a><a name="id2514666"></a><b></b></td><td align="left" valign="top"><p>
		When would you use both the per share parameter <i class="parameter"><tt>force user</tt></i> as well
		as setting the share root directory SUID?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		You would use both parameters when it is necessary to guarantee that all share handling operations
		are conducted as the forced user, while all file and directory creation are done as the SUID
		directory owner.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514691"></a><a name="id2514693"></a><b></b></td><td align="left" valign="top"><p>
		What is better about CUPS printing than LPRng printing?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		CUPS is a print spooling system that has integrated remote management facilities, provides completely
		automated print processing/preprocessing, and has the potential to be configured to automatically
		apply print preprocessing filters to ensure that a print job submitted is correctly rendered for the
		target printer. CUPS includes an image file RIP that supports printing of image files to 
		non-PostScript printers. CUPS has lots of bells and whistles and is more like a super-charged MS Windows
		NT/200x print monitor and processor. Its complexity can be eliminated or turbo-charged to suit
		any fancy.
		</p><p>
		The LPRng software is an enhanced, extended, and portable implementation of the Berkeley LPR print 
		spooler functionality. It provides the same interface and meets RFC1179 requirements. LPRng is capable
		of being configured to act like CUPS, but it is in principle a replacement for the old Berkeley lpr/lpd
		spooler. LPRng is generally preferred by those who are familiar with Berkeley lpr/lpd.
		</p><p>
		Which is better is a matter of personal taste. It depends on what you want to do and how you want to
		do it and manage it. Most modern Linux systems ship with CUPS as the default print management system.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514746"></a><a name="id2514748"></a><b></b></td><td align="left" valign="top"><p>
		When should Windows client IP addresses be hard coded?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		When there are few MS Windows clients, little client change, no mobile users, and users are not
		inclined to tamper with network settings, it is a safe and convenient matter to hard-code Windows
		client TCP/IP settings. Given that it is possible to lock down the Windows desktop and remove
		user ability to access network configuration controls, fixed configuration eliminates the need
		for a DHCP server. This reduces maintenance overheads and eliminates a possible point of network
		failure.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514772"></a><a name="id2514774"></a><b></b></td><td align="left" valign="top"><p>
		Under what circumstances would it be best to use a DHCP server?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		In network configurations where there are mobile users, or where Windows client PCs move around
		(particularly between offices or between subnets), it makes complete sense to control all Windows
		client configurations using a DHCP server. Additionally, when users do tamper with the network
		settings, the use of DHCP can be used to normalize all client settings. 
		</p><p>
		One of the least appreciated benefits of using a DHCP server to assign all network client
		device TCP/IP settings is that it makes it a pain-free process to change network TCP/IP
		settings, change network addressing, or enhance the ability of client devices to
		benefit from new network services.
		</p><p>
		Another benefit of modern DHCP servers is the ability of the DHCP server to register dynamically
		assigned IP addresses with the DNS server. The benefits of Dynamic DNS (DDNS) are considerable in 
		a large Windows network environment.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514811"></a><a name="id2514814"></a><b></b></td><td align="left" valign="top"><p>
		What is the purpose of setting the parameter <i class="parameter"><tt>guest ok</tt></i> on a share?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		If this parameter is yes for a service, then no password is required to connect to the service.
		Privileges are those of the guest account.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514837"></a><a name="id2514839"></a><b></b></td><td align="left" valign="top"><p>
		When would you set the global parameter <i class="parameter"><tt>disable spoolss</tt></i>?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		Setting this parameter to <tt class="constant">Yes</tt> disables Samba's support for the SPOOLSS set of 
		MS-RPC's and yields behavior identical to Samba 2.0.x. Windows NT/2000 clients can downgrade to 
		using LanMan style printing commands. Windows 9x/ME are unaffected by the parameter. However, this 
		disables the ability to upload printer drivers to a Samba server via the Windows NT/200x Add Printer 
		Wizard or by using the NT printer properties dialog window. It also disables the capability of 
		Windows NT/200x clients to download print drivers from the Samba host on demand. Be extremely careful about 
		setting this parameter.
		</p><p>
		The alternate parameter <i class="parameter"><tt>use client driver</tt></i> applies only to Windows NT/200x clients. It has no 
		effect on Windows 95/98/ME clients. When serving a printer to Windows NT/200x clients without first installing a valid 
		printer driver on the Samba host, the client is required to install a local printer driver. From this point on, 
		the client treats the printer as a local printer and not a network printer connection. This is much the same behavior 
		that occurs when <i class="parameter"><tt>disable spoolss = yes</tt></i>.
		</p><p>
		Under normal circumstances, the NT/200x client attempts to open the network printer using MS-RPC. Because the client 
		considers the printer to be local, it attempts to issue the OpenPrinterEx() call requesting access rights associated 
		with the logged on user. If the user possesses local administrator rights but not root privilege on the Samba host (often 
		the case), the OpenPrinterEx() call fails. The result is that the client now displays an "Access Denied; Unable 
		to connect" message in the printer queue window (even though jobs may be printed successfully). This parameter MUST
		not be enabled on a print share that has valid print driver installed on the Samba server.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514912"></a><a name="id2514914"></a><b></b></td><td align="left" valign="top"><p>
		Why would you disable password caching on Windows 9x/Me clients?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		Windows 9x/Me workstations that are set at default (password caching enabled) store the username and
		password in files located in the Windows master directory. Such files can be scavenged (read off a client
		machine) and decrypted, thus revealing the user's access credentials for all systems the user may have accessed.
		It is most insecure to allow any Windows 9x/Me client to operate with password caching enabled.
		</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2514936"></a><a name="id2514939"></a><b></b></td><td align="left" valign="top"><p>
		The example of Abmas Accounting Inc. uses User Mode security. How does this provide anonymous access?
		</p></td></tr><tr class="answer"><td align="left" valign="top"><b></b></td><td align="left" valign="top"><p>
		The example used does not provide anonymous access. Since the clients are all Windows 2000 Professional,
		and given that users are logging onto their machines, by default the client attempts to connect to
		a remote server using currently logged in user credentials. By ensuring that the user's login ID and
		password is the same as those set on the Samba server, access is transparent and does not require
		separate user authentication.
		</p></td></tr></tbody></table></div></div><div class="footnotes"><br><hr width="100" align="left"><div class="footnote"></div><div class="footnote"></div><div class="footnote"><i class="parameter"><tt><sup>[<a name="ftn.id2513700" href="#id2513700">4</a>] </sup>smbpasswd</tt></i><i class="parameter"><tt>passdb backend</tt></i><tt class="filename">smb.conf</tt></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="primer.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="small.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 1. Networking Primer </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. Small Office Networking</td></tr></table></div></body></html>