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