Large number of small fixes to the layout and the build system.
[Samba.git] / docs / Samba3-HOWTO / TOSHARG-StandAloneServer.xml
blobad1b69e79e5919e09d725b937a2d5ea483b2a141
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <chapter id="StandAloneServer">
4 <chapterinfo>
5         &author.jht;
6 </chapterinfo>
7 <title>Stand-alone Servers</title>
9 <para>
10 Stand-alone Servers are independent of Domain Controllers on the network.
11 They are not Domain Members and function more like workgroup servers. In many
12 cases a Stand-alone Server is configured with a minimum of security control
13 with the intent that all data served will be readily accessible to all users.
14 </para>
16 <sect1>
17 <title>Features and Benefits</title>
19 <para>
20 Stand-alone Servers can be as secure or as insecure as needs dictate. They can
21 have simple or complex configurations. Above all, despite the hoopla about
22 Domain Security they remain a common installation.
23 </para>
25 <para>
26 If all that is needed is a server for read-only files, or for
27 printers alone, it may not make sense to effect a complex installation.
28 For example: A drafting office needs to store old drawings and reference
29 standards. No-one can write files to the server as it is legislatively
30 important that all documents remain unaltered. A share mode read-only Stand-alone
31 Server is an ideal solution.
32 </para>
34 <para>
35 Another situation that warrants simplicity is an office that has many printers
36 that are queued off a single central server. Everyone needs to be able to print
37 to the printers, there is no need to effect any access controls and no files will
38 be served from the print server. Again, a share mode Stand-alone Server makes
39 a great solution.
40 </para>
41 </sect1>
43 <sect1>
44 <title>Background</title>
46 <para>
47 The term <emphasis>Stand-alone Server</emphasis> means that it
48 will provide local authentication and access control for all resources
49 that are available from it. In general this means that there will be a
50 local user database. In more technical terms, it means resources
51 on the machine will be made available in either SHARE mode or in
52 USER mode.
53 </para>
55 <para>
56 No special action is needed other than to create user accounts. Stand-alone
57 servers do not provide network logon services. This means that machines that
58 use this server do not perform a domain logon to it. Whatever logon facility
59 the workstations are subject to is independent of this machine. It is, however,
60 necessary to accommodate any network user so the logon name they use will
61 be translated (mapped) locally on the Stand-alone Server to a locally known
62 user name. There are several ways this can be done.
63 </para>
65 <para>
66 Samba tends to blur the distinction a little in respect of what is
67 a Stand-alone Server. This is because the authentication database may be
68 local or on a remote server, even if from the SMB protocol perspective
69 the Samba server is not a member of a domain security context.
70 </para>
72 <para>
73 Through the use of Pluggable Authentication Modules (PAM) and the name service switcher (NSSWITCH),
74 which maintains the UNIX-user database) the source of authentication may reside on 
75 another server. We would be inclined to call this the authentication server.
76 This means that the Samba server may use the local UNIX/Linux system password database
77 (<filename>/etc/passwd</filename> or <filename>/etc/shadow</filename>), may use a
78 local smbpasswd file, or may use an LDAP backend, or even via PAM and Winbind another CIFS/SMB server
79 for authentication.
80 </para>
82 </sect1>
84 <sect1>
85 <title>Example Configuration</title>
87 <para>
88 The examples, <link linkend="simplynice">Reference Documentation Server</link>, and 
89 <link linkend="SimplePrintServer">Central Print Serving</link>,
90 are designed to inspire simplicity. It is too easy to attempt a high level of creativity
91 and to introduce too much complexity in server and network design.
92 </para>
94 <sect2 id="RefDocServer">
95 <title>Reference Documentation Server</title>
97 <para>
98 Configuration of a read-only data server that everyone can access is very simple.
99 <link linkend="simplynice">Following example</link> is the &smb.conf; file that will do this. Assume that all the reference documents
100 are stored in the directory <filename>/export</filename>, and the documents are owned by a user other than
101 nobody. No home directories are shared, and there are no users in the <filename>/etc/passwd</filename>
102 UNIX system database. This is a simple system to administer.
103 </para>
105 <smbconfexample id="simplynice">
106 <title>smb.conf for Reference Documentation Server</title>
107 <smbconfcomment> Global parameters</smbconfcomment>
108 <smbconfsection name="[global]"/>
109 <smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
110 <smbconfoption name="netbios name">&example.server.samba;</smbconfoption>
111 <smbconfoption name="security">SHARE</smbconfoption>
112 <smbconfoption name="passdb backend">guest</smbconfoption>
113 <smbconfoption name="wins server">192.168.1.1</smbconfoption>
114 <smbconfsection name="[data]"/>
115 <smbconfoption name="comment">Data</smbconfoption>
116 <smbconfoption name="path">/export</smbconfoption>
117 <smbconfoption name="guest only">Yes</smbconfoption>
118 </smbconfexample>
120 <para>
121 In <link linkend="simplynice">the example</link> above, the machine name is set to &example.server.samba;, the workgroup is set to the name
122 of the local workgroup (&example.workgroup;) so the machine will appear together with systems with
123 which users are familiar. The only password backend required is the <quote>guest</quote> backend to allow default
124 unprivileged account names to be used. As there is a WINS server on this network, we of obviously make use of it.
125 </para>
127 </sect2>
129 <sect2 id="SimplePrintServer">
130 <title>Central Print Serving</title>
132 <para>
133 Configuration of a simple print server is easy if you have all the right tools
134 on your system.
135 </para>
137 <orderedlist>
138 <title> Assumptions:</title>
139         <listitem><para>
140         The print server must require no administration.
141         </para></listitem>
143         <listitem><para>
144         The print spooling and processing system on our print server will be CUPS.
145         (Please refer to <link linkend="CUPS-printing">CUPS Printing Support</link> for more information).
146         </para></listitem>
148         <listitem><para>
149         The print server will service only network printers. The network administrator
150         will correctly configure the CUPS environment to support the printers.
151         </para></listitem>
153         <listitem><para>
154         All workstations will use only postscript drivers. The printer driver
155         of choice is the one shipped with the Windows OS for the Apple Color LaserWriter.
156         </para></listitem>
157 </orderedlist>
159 <para>
160 In this example our print server will spool all incoming print jobs to
161 <filename>/var/spool/samba</filename> until the job is ready to be submitted by
162 Samba to the CUPS print processor. Since all incoming connections will be as
163 the anonymous (guest) user, two things will be required:
164 </para>
166 <itemizedlist>
167 <title>Enabling Anonymous Printing</title>
168         <listitem><para>
169         The UNIX/Linux system must have a <command>guest</command> account.
170         The default for this is usually the account <command>nobody</command>.
171         To find the correct name to use for your version of Samba, do the 
172         following:
173 <screen>
174 &prompt;<userinput>testparm -s -v | grep "guest account"</userinput>
175 </screen>
176         Make sure that this account exists in your system password
177         database (<filename>/etc/passwd</filename>).
178         </para></listitem>
180         <listitem><para>
181         The directory into which Samba will spool the file must have write
182         access for the guest account. The following commands will ensure that
183         this directory is available for use:
184 <screen>
185 &rootprompt;<userinput>mkdir /var/spool/samba</userinput>
186 &rootprompt;<userinput>chown nobody.nobody /var/spool/samba</userinput>
187 &rootprompt;<userinput>chmod a+rwt /var/spool/samba</userinput>
188 </screen>
189         </para></listitem>
190 </itemizedlist>
192 <para>
193 The contents of the &smb.conf; file is shown in <link linkend="AnonPtrSvr">the next example</link>.
194 </para>
196 <para>
197 <smbconfexample id="AnonPtrSvr">
198 <title>&smb.conf; for Anonymous Printing</title>
199 <smbconfcomment> Global parameters</smbconfcomment>
200 <smbconfsection name="[global]"/>
201 <smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
202 <smbconfoption name="netbios name">&example.server.samba;</smbconfoption>
203 <smbconfoption name="security">SHARE</smbconfoption>
204 <smbconfoption name="passdb backend">guest</smbconfoption>
205 <smbconfoption name="printing">cups</smbconfoption>
206 <smbconfoption name="printcap name">cups</smbconfoption>
208 <smbconfsection name="[printers]"/>
209 <smbconfoption name="comment">All Printers</smbconfoption>
210 <smbconfoption name="path">/var/spool/samba</smbconfoption>
211 <smbconfoption name="printer admin">root</smbconfoption>
212 <smbconfoption name="guest ok">Yes</smbconfoption>
213 <smbconfoption name="printable">Yes</smbconfoption>
214 <smbconfoption name="use client driver">Yes</smbconfoption>
215 <smbconfoption name="browseable">No</smbconfoption>
216 </smbconfexample>
217 </para>
220 <note><para>
221 <indexterm><primary>MIME</primary><secondary>raw</secondary></indexterm>
222 <indexterm><primary>raw printing</primary></indexterm>
223 On CUPS-enabled systems there is a facility to pass raw data directly to the printer without
224 intermediate processing via CUPS print filters. Where use of this mode of operation is desired,
225 it is necessary to configure a raw printing device. It is also necessary to enable the raw mime
226 handler in the <filename>/etc/mime.conv</filename> and <filename>/etc/mime.types</filename>
227 files. Refer to <link linkend="cups-raw">Explicitly Enable <quote>raw</quote> Printing for 
228 <emphasis>application/octet-stream</emphasis></link>.
229 </para></note>
231 </sect2>
233 </sect1>
235 <sect1>
236 <title>Common Errors</title>
238 <para>
239 The greatest mistake so often made is to make a network configuration too complex.
240 It pays to use the simplest solution that will meet the needs of the moment.
241 </para>
243 </sect1>
244 </chapter>