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">
7 <title>Standalone Servers</title>
10 Standalone 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 standalone server is configured with a minimum of security control
13 with the intent that all data served will be readily accessible to all users.
17 <title>Features and Benefits</title>
20 Standalone 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.
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. Noone can write files to the server because it is legislatively
30 important that all documents remain unaltered. A share-mode read-only standalone
31 server is an ideal solution.
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 standalone server makes
44 <title>Background</title>
47 The term <emphasis>standalone 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 <emphasis>share</emphasis> mode or in
52 <emphasis>user</emphasis> mode.
56 No special action is needed other than to create user accounts. Standalone
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 he or she uses will
61 be translated (mapped) locally on the standalone server to a locally known
62 user name. There are several ways this can be done.
66 Samba tends to blur the distinction a little in defining
67 a standalone 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.
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
85 <title>Example Configuration</title>
88 Examples 7.3.1 and 7.3.2
89 are designed to inspire simplicity. It is too easy to attempt a high level of creativity
90 and to introduce too much complexity in server and network design.
93 <sect2 id="RefDocServer">
94 <title>Reference Documentation Server</title>
97 Configuration of a read-only data server that everyone can access is very simple.
98 <link linkend="simplynice">The following example (7.3.1)</link> is the &smb.conf; file that will do this. Assume that all the reference documents
99 are stored in the directory <filename>/export</filename>, and the documents are owned by a user other than
100 nobody. No home directories are shared, and there are no users in the <filename>/etc/passwd</filename>
101 UNIX system database. This is a simple system to administer.
104 <example id="simplynice">
105 <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>
122 In <link linkend="simplynice">this example</link>, the machine name is set to &example.server.samba;, and the workgroup is set to the name
123 of the local workgroup (&example.workgroup;) so the machine will appear together with systems with
124 which users are familiar. The only password backend required is the <quote>guest</quote> backend to allow default
125 unprivileged account names to be used. As there is a WINS server on this network, we of course make use of it.
130 <sect2 id="SimplePrintServer">
131 <title>Central Print Serving</title>
134 Configuration of a simple print server is easy if you have all the right tools
139 <title> Assumptions</title>
141 The print server must require no administration.
145 The print spooling and processing system on our print server will be CUPS.
146 (Please refer to <link linkend="CUPS-printing">CUPS Printing Support</link>, for more information).
150 The print server will service only network printers. The network administrator
151 will correctly configure the CUPS environment to support the printers.
155 All workstations will use only PostScript drivers. The printer driver
156 of choice is the one shipped with the Windows OS for the Apple Color LaserWriter.
161 In this example our print server will spool all incoming print jobs to
162 <filename>/var/spool/samba</filename> until the job is ready to be submitted by
163 Samba to the CUPS print processor. Since all incoming connections will be as
164 the anonymous (guest) user, two things will be required to enable anonymous printing.
168 <title>Enabling Anonymous Printing</title>
170 The UNIX/Linux system must have a <command>guest</command> account.
171 The default for this is usually the account <command>nobody</command>.
172 To find the correct name to use for your version of Samba, do the
175 &prompt;<userinput>testparm -s -v | grep "guest account"</userinput>
177 Make sure that this account exists in your system password
178 database (<filename>/etc/passwd</filename>).
182 The directory into which Samba will spool the file must have write
183 access for the guest account. The following commands will ensure that
184 this directory is available for use:
186 &rootprompt;<userinput>mkdir /var/spool/samba</userinput>
187 &rootprompt;<userinput>chown nobody.nobody /var/spool/samba</userinput>
188 &rootprompt;<userinput>chmod a+rwt /var/spool/samba</userinput>
194 The contents of the &smb.conf; file is shown in <link linkend="AnonPtrSvr">Example 7.3.2</link>.
197 <example id="AnonPtrSvr">
198 <title>&smb.conf; for Anonymous Printing</title>
200 <smbconfcomment> Global parameters</smbconfcomment>
201 <smbconfsection name="[global]"/>
202 <smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
203 <smbconfoption name="netbios name">&example.server.samba;</smbconfoption>
204 <smbconfoption name="security">SHARE</smbconfoption>
205 <smbconfoption name="passdb backend">guest</smbconfoption>
206 <smbconfoption name="printing">cups</smbconfoption>
207 <smbconfoption name="printcap name">cups</smbconfoption>
209 <smbconfsection name="[printers]"/>
210 <smbconfoption name="comment">All Printers</smbconfoption>
211 <smbconfoption name="path">/var/spool/samba</smbconfoption>
212 <smbconfoption name="printer admin">root</smbconfoption>
213 <smbconfoption name="guest ok">Yes</smbconfoption>
214 <smbconfoption name="printable">Yes</smbconfoption>
215 <smbconfoption name="use client driver">Yes</smbconfoption>
216 <smbconfoption name="browseable">No</smbconfoption>
222 <indexterm><primary>MIME</primary><secondary>raw</secondary></indexterm>
223 <indexterm><primary>raw printing</primary></indexterm>
224 On CUPS-enabled systems there is a facility to pass raw data directly to the printer without
225 intermediate processing via CUPS print filters. Where use of this mode of operation is desired,
226 it is necessary to configure a raw printing device. It is also necessary to enable the raw mime
227 handler in the <filename>/etc/mime.conv</filename> and <filename>/etc/mime.types</filename>
228 files. Refer to <link linkend="CUPS-printing">CUPS Printing Support</link>, <link linkend="cups-raw">Explicitly Enable raw Printing for
229 application/octet-stream</link>.
237 <title>Common Errors</title>
240 The greatest mistake so often made is to make a network configuration too complex.
241 It pays to use the simplest solution that will meet the needs of the moment.