d8f5992191c55214786507e4863964a07d2f8d18
[sfrench/samba-autobuild/.git] / docs / docbook / projdoc / 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 independant 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 readilly 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 very 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 affect 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 affect 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 the server
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 that 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 log onto it. Whatever logon facility
57 the workstations are subject to is independant of this machine. It is however
58 necessary to accomodate any network user so that 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 cane 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 samba 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 PAM (Pluggable Authentication Modules) and nsswitch
72 (the name service switcher) 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 (/etc/passwd or /etc/shadow), may use a local smbpasswd file, or may use
76 an LDAP back end, 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 following examples are designed to inspire simplicity. It is too easy to
87 attempt a high level of creativity and to introduce too much complexity in
88 server and network design.
89 </para>
90
91 <sect2>
92 <title>Reference Documentation Server</title>
93
94 <para>
95 Configuration of a read-only data server that EVERYONE can access is very simple.
96 Here is the smb.conf file that will do this. Assume that all the reference documents
97 are stored in the directory /export, that the documents are owned by a user other than
98 nobody. No home directories are shared, that are no users in the <filename>/etc/passwd</filename>
99 Unix system database. This is a very simple system to administer.
100 </para>
101
102 <para>
103 <programlisting>
104         <title>Share Mode Read Only Stand-Alone Server</title>
105         # Global parameters
106         [global]
107                 workgroup = MYGROUP
108                 netbios name = REFDOCS
109                 security = SHARE
110                 passdb backend = guest
111                 wins server = 192.168.1.1
112
113         [data]
114                 comment = Data
115                 path = /export
116                 guest only = Yes
117 </programlisting>
118 </para>
119
120 <para>
121 In the above example the machine name is set to REFDOCS, the workgroup is set to the name
122 of the local workgroup so that the machine will appear in with systems users are familiar
123 with. The only password backend required is the "guest" backend so as to allow default
124 unprivilidged account names to be used. Given that there is a WINS server on this network
125 we do use it.
126 </para>
127
128 </sect2>
129
130 <sect2>
131 <title>Central Print Serving</title>
132
133 <para>
134 Configuration of a simple print server is very simple if you have all the right tools
135 on your system.
136 </para>
137
138 <orderedlist>
139 <title> Assumptions:</title>
140         <listitem><para>
141         The print server must require no administration
142         </para></listitem>
143
144         <listitem><para>
145         The print spooling and processing system on our print server will be CUPS.
146         (Please refer to the chapter on printing for more information).
147         </para></listitem>
148
149         <listitem><para>
150         All printers will that the print server will service will be network
151         printers. They will be correctly configured, by the administrator, 
152         in the CUPS environment.
153         </para></listitem>
154
155         <listitem><para>
156         All workstations will be installed using postscript drivers. The printer
157         of choice is the Apple Color LaserWriter.
158         </para></listitem>
159 </orderedlist>
160
161 <para>
162 In this example our print server will spool all incoming print jobs to
163 <filename>/var/spool/samba</filename> until the job is ready to be submitted by
164 samba to the CUPS print processor. Since all incoming connections will be as
165 the anonymous (guest) user two things will be required:
166 </para>
167
168 <itemizedlist>
169 <title>Enablement for Anonymous Printing</title>
170         <listitem><para>
171         The Unix/Linux system must have a <command>guest</command> account.
172         The default for this is usually the account <command>nobody</command>.
173         To find the correct name to use for your version of Samba do the 
174         following:
175         <programlisting>
176                 testparm -s -v | grep "guest account"
177         </programlisting>
178         Then make sure that this account exists in your system password
179         database (<filename>/etc/passwd</filename>).
180         </para></listitem>
181
182         <listitem><para>
183         The directory into which Samba will spool the file must have write
184         access for the guest account. The following commands will ensure that
185         this directory is available for use:
186         <programlisting>
187                 mkdir /var/spool/samba
188                 chown nobody.nobody /var/spool/samba
189                 chmod a+rwt /var/spool/samba
190         </programlisting>
191         </para></listitem>
192 </itemizedlist>
193
194 <para>
195 <programlisting>
196         <title>Simple Central Print Server</title>
197         # Global parameters
198         [global]
199                 workgroup = MYGROUP
200                 netbios name = PTRSVR1
201                 security = SHARE
202                 passdb backend = guest
203                 wins server = 192.168.1.1
204
205         [printers]
206                 comment = All Printers
207                 path = /var/spool/samba
208                 printer admin = root
209                 guest ok = Yes
210                 printable = Yes
211                 printing = cups
212                 use client driver = Yes
213                 browseable = No
214 </programlisting>
215 </para>
216
217 </sect2>
218
219 </sect1>
220
221 <sect1>
222 <title>Common Errors</title>
223
224 <para>
225 The greatest mistake so often made is to make a network configuration too complex.
226 It pays to use the simplest solution that will meet the needs of the moment.
227 </para>
228
229 </sect1>
230 </chapter>