~ubuntu-branches/ubuntu/raring/ubuntu-docs/raring

« back to all changes in this revision

Viewing changes to serverguide/C/file-server.xml

  • Committer: Bazaar Package Importer
  • Author(s): Matthew East
  • Date: 2010-09-19 11:35:42 UTC
  • Revision ID: james.westby@ubuntu.com-20100919113542-mbxqe7yuo4ggnrw3
Tags: 10.10.3
* Amend font-family for browser startpage (LP: #195590)
* Add translations from Launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" 
3
 
        "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4
 
<!ENTITY % globalent SYSTEM "../../libs/global.ent">
5
 
%globalent;
6
 
<!ENTITY % gnome-menus-C SYSTEM "../../libs/gnome-menus-C.ent">
7
 
%gnome-menus-C;
8
 
<!ENTITY % xinclude SYSTEM "../../libs/xinclude.mod">
9
 
%xinclude;
10
 
<!ENTITY language "&EnglishAmerican;">
11
 
]>
12
 
<chapter id="file-servers" status="review">
13
 
        <title>File Servers</title>
14
 
 
15
 
        <para>
16
 
        If you have more than one computer on a single network.  At some point you will probably
17
 
        need to share files between them.  In this section we cover installing and configuring 
18
 
        FTP, NFS, and CUPS. 
19
 
        </para>
20
 
 
21
 
        <sect1 id="ftp-server" status="review">
22
 
          <title>FTP Server</title> 
23
 
 
24
 
          <para>
25
 
          File Transfer Protocol (FTP) is a TCP protocol for uploading and downloading
26
 
          files between computers. FTP works on a client/server model. The server component is
27
 
          called an <emphasis>FTP daemon</emphasis>. It continuously listens for FTP requests
28
 
          from remote clients. When a request is received, it manages the login and sets up
29
 
          the connection. For the duration of the session it executes any of commands sent by
30
 
          the FTP client.
31
 
          </para>
32
 
 
33
 
          <para>Access to an FTP server can be managed in two ways:</para>
34
 
 
35
 
          <itemizedlist spacing="compact">
36
 
            <listitem>
37
 
              <para>Anonymous</para>
38
 
            </listitem>
39
 
            <listitem>
40
 
              <para>Authenticated</para>
41
 
            </listitem>
42
 
          </itemizedlist>
43
 
          <para>
44
 
          In the Anonymous mode, remote clients can access the FTP server by using the
45
 
          default user account called &quot;anonymous&quot; or &quot;ftp&quot; and
46
 
          sending an email address as the password. In the Authenticated mode a user must
47
 
          have an account and a password. User access to the FTP server directories and files is
48
 
          dependent on the permissions defined for the account used at login. As a general
49
 
          rule, the FTP daemon will hide the root directory of the FTP server and change it to
50
 
          the FTP Home directory. This hides the rest of the file system from remote
51
 
          sessions.
52
 
          </para>
53
 
 
54
 
          <sect2 id="vsftpd-ftp-server-installation" status="review">
55
 
            <title>vsftpd - FTP Server Installation</title>
56
 
 
57
 
            <para>
58
 
            vsftpd is an FTP daemon available in
59
 
            Ubuntu. It is easy to install, set up, and
60
 
            maintain.  To install <application>vsftpd</application> you
61
 
            can run the following command:
62
 
            </para>
63
 
      
64
 
<screen>
65
 
<command>sudo apt-get install vsftpd</command>
66
 
</screen>
67
 
                
68
 
 
69
 
            </sect2>
70
 
            <sect2 id="vsftpd-anonymous-configuration" status="review">
71
 
              <title>Anonymous FTP Configuration</title>
72
 
 
73
 
                <para>
74
 
                By default <application>vsftpd</application> is <emphasis>not</emphasis> configured to only allow anonymous download.
75
 
                If you wish to enable anonymous download edit <filename>/etc/vsftpd.conf</filename> changing:
76
 
                </para>
77
 
 
78
 
<programlisting>
79
 
anonymous_enable=Yes
80
 
</programlisting>
81
 
 
82
 
                <para>
83
 
                During installation a <emphasis>ftp</emphasis> user is created with a home directory 
84
 
                of <filename>/srv/ftp</filename>.  This is the default FTP directory.
85
 
                </para>
86
 
 
87
 
                <para>
88
 
                If you wish to change this location, to <filename>/srv/files/ftp</filename>
89
 
                for example, simply create a directory in another location and 
90
 
                change the <emphasis>ftp</emphasis> user's home directory:
91
 
                </para>
92
 
 
93
 
<screen>
94
 
<command>sudo mkdir /srv/files/ftp</command>
95
 
<command>sudo usermod -d /srv/files/ftp ftp</command> 
96
 
</screen>
97
 
 
98
 
                <para>
99
 
                After making the change restart <application>vsftpd</application>:
100
 
                </para>
101
 
 
102
 
<screen>
103
 
<command>sudo restart vsftpd</command>
104
 
</screen>
105
 
 
106
 
                <para>
107
 
                Finally, copy any files and directories you would like to make available
108
 
                through anonymous FTP to <filename>/srv/files/ftp</filename>, or <filename>/srv/ftp</filename> if you wish to 
109
 
                use the default.
110
 
                </para>
111
 
 
112
 
              </sect2>
113
 
              <sect2 id="vsftpd-userauth-configuration" status="review">
114
 
                <title>User Authenticated FTP Configuration</title>
115
 
 
116
 
                <para>
117
 
                By default <application>vsftpd</application> is configured to authenticate
118
 
                system users and allow them to download files.  If you want users to be able to upload files, edit
119
 
                <filename>/etc/vsftpd.conf</filename>:
120
 
                </para>
121
 
 
122
 
<programlisting>
123
 
write_enable=YES
124
 
</programlisting>
125
 
 
126
 
                <para>
127
 
                Now restart <application>vsftpd</application>:
128
 
                </para>
129
 
 
130
 
<screen>
131
 
<command>sudo restart vsftpd</command>
132
 
</screen>
133
 
 
134
 
                <para>
135
 
                Now when system users login to FTP they will start in their 
136
 
                <emphasis>home</emphasis> directories where they can download,
137
 
                upload, create directories, etc.
138
 
                </para>
139
 
 
140
 
                <para>
141
 
                Similarly, by default, the anonymous users are not
142
 
                allowed to upload files to FTP server. To change
143
 
                this setting, you should uncomment the following
144
 
                line, and restart <application>vsftpd</application>:
145
 
                </para>
146
 
 
147
 
<programlisting>
148
 
anon_upload_enable=YES
149
 
</programlisting>
150
 
 
151
 
                <warning>
152
 
                  <para>
153
 
                  Enabling anonymous FTP upload can be an extreme security risk.  It is best to not enable 
154
 
                  anonymous upload on servers accessed directly from the Internet.
155
 
                  </para>
156
 
                </warning>
157
 
 
158
 
                <para>
159
 
                The configuration file consists of many
160
 
                configuration parameters. The information about
161
 
                each parameter is available in the configuration
162
 
                file. Alternatively, you can refer to the man
163
 
                page, <command>man 5 vsftpd.conf</command> for
164
 
                details of each parameter. 
165
 
                </para>
166
 
 
167
 
                </sect2>
168
 
                <sect2 id="vsftpd-security" status="review">
169
 
                  <title>Securing FTP</title>
170
 
 
171
 
                  <para> 
172
 
                  There are options in <filename>/etc/vsftpd.conf</filename> to
173
 
                  help make <application>vsftpd</application> more secure.  For
174
 
                  example users can be limited to their home directories by uncommenting:
175
 
                  </para>
176
 
 
177
 
<programlisting>
178
 
chroot_local_user=YES
179
 
</programlisting>
180
 
 
181
 
                  <para>
182
 
                  You can also limit a specific list of users to just their home directories:
183
 
                  </para>
184
 
 
185
 
<programlisting>
186
 
chroot_list_enable=YES
187
 
chroot_list_file=/etc/vsftpd.chroot_list
188
 
</programlisting>
189
 
 
190
 
                  <para>
191
 
                  After uncommenting the above options, create a <filename>/etc/vsftpd.chroot_list</filename>
192
 
                  containing a list of users one per line.  Then restart <application>vsftpd</application>:
193
 
                  </para>
194
 
 
195
 
<screen>
196
 
<command>sudo restart vsftpd</command>
197
 
</screen>
198
 
                  
199
 
                  <para>
200
 
                  Also, the <filename>/etc/ftpusers</filename> file is a list of users that
201
 
                  are <emphasis>disallowed</emphasis> FTP access.  The default list 
202
 
                  includes root, daemon, nobody, etc.  To disable FTP access for additional
203
 
                  users simply add them to the list.
204
 
                  </para>
205
 
 
206
 
                  <para>
207
 
                  FTP can also be encrypted using <emphasis>FTPS</emphasis>.  Different from <emphasis>SFTP</emphasis>,
208
 
                  <emphasis>FTPS</emphasis> is FTP over Secure Socket Layer (SSL).  <emphasis>SFTP</emphasis> is a FTP 
209
 
                  like session over an encrypted <emphasis>SSH</emphasis> connection.  A major difference is that users
210
 
                  of SFTP need to have a <emphasis>shell</emphasis> account on the system, instead of a 
211
 
                  <emphasis>nologin</emphasis> shell.  Providing all users with a shell may not be ideal for some 
212
 
                  environments, such as a shared web host.
213
 
                  </para>
214
 
 
215
 
                  <para>
216
 
                  To configure <emphasis>FTPS</emphasis>, edit <filename>/etc/vsftpd.conf</filename> and at the bottom add:
217
 
                  </para>
218
 
 
219
 
<programlisting>
220
 
ssl_enable=Yes
221
 
</programlisting>
222
 
           
223
 
                  <para>
224
 
                  Also, notice the certificate and key related options:
225
 
                  </para>
226
 
 
227
 
<programlisting>
228
 
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
229
 
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
230
 
</programlisting>
231
 
 
232
 
                  <para>
233
 
                  By default these options are set the certificate and key provided by the <application>ssl-cert</application>
234
 
                  package.  In a production environment these should be replaced with a certificate and key generated for the specific
235
 
                  host.  For more information on certificates see <xref linkend="certificates-and-security"/>.
236
 
                  </para>
237
 
 
238
 
                  <para>
239
 
                  Now restart <application>vsftpd</application>, and non-anonymous users will be forced to use 
240
 
                  <emphasis>FTPS</emphasis>:
241
 
                  </para>
242
 
 
243
 
<screen>
244
 
<command>sudo restart vsftpd</command>
245
 
</screen>
246
 
 
247
 
                  <para>
248
 
                  To allow users with a shell of <filename>/usr/sbin/nologin</filename> access to FTP, but have no shell access, 
249
 
                  edit <filename>/etc/shells</filename> adding the <emphasis>nologin</emphasis> shell:
250
 
                  </para>
251
 
 
252
 
<programlisting>
253
 
# /etc/shells: valid login shells
254
 
/bin/csh
255
 
/bin/sh
256
 
/usr/bin/es
257
 
/usr/bin/ksh
258
 
/bin/ksh
259
 
/usr/bin/rc
260
 
/usr/bin/tcsh
261
 
/bin/tcsh
262
 
/usr/bin/esh
263
 
/bin/dash
264
 
/bin/bash
265
 
/bin/rbash
266
 
/usr/bin/screen
267
 
/usr/sbin/nologin
268
 
</programlisting>
269
 
 
270
 
                  <para>
271
 
                  This is necessary because, by default <application>vsftpd</application> uses PAM for authentication, and the 
272
 
                  <filename>/etc/pam.d/vsftpd</filename> configuration file contains:
273
 
                  </para>
274
 
 
275
 
<programlisting>
276
 
auth    required        pam_shells.so
277
 
</programlisting>
278
 
 
279
 
                  <para>
280
 
                  The <emphasis>shells</emphasis> PAM module restricts access to shells listed in the <filename>/etc/shells</filename>
281
 
                  file.
282
 
                  </para>
283
 
 
284
 
                  <para>
285
 
                  Most popular FTP clients can be configured connect using FTPS.  The <application>lftp</application> command line FTP
286
 
                  client has the ability to use FTPS as well.
287
 
                  </para>
288
 
 
289
 
                </sect2>
290
 
                <sect2 id="vsftpd-references" status="review">
291
 
                  <title>References</title>
292
 
 
293
 
                  <itemizedlist>
294
 
                    <listitem>
295
 
                      <para>
296
 
                      See the <ulink url="http://vsftpd.beasts.org/vsftpd_conf.html">vsftpd website</ulink> for more information.
297
 
                      </para>
298
 
                    </listitem>
299
 
                    <listitem>
300
 
                      <para>
301
 
                      For detailed <filename>/etc/vsftpd.conf</filename> options see the 
302
 
                      <ulink url="http://manpages.ubuntu.com/manpages/&distro-short-codename;/en/man5/vsftpd.conf.5.html">vsftpd.conf man page</ulink>.
303
 
                      </para>
304
 
                    </listitem>
305
 
                    <listitem>
306
 
                      <para>
307
 
                      The CodeGurus article <ulink url="http://www.codeguru.com/csharp/.net/net_general/internet/article.php/c14329">
308
 
                      FTPS vs. SFTP: What to Choose</ulink> has useful information contrasting FTPS and SFTP.
309
 
                      </para>
310
 
                    </listitem>
311
 
                    <listitem>
312
 
                      <para>
313
 
                      Also, for more information see the <ulink url="https://help.ubuntu.com/community/vsftpd">Ubuntu Wiki vsftpd</ulink> page.
314
 
                      </para>
315
 
                    </listitem>
316
 
                  </itemizedlist>
317
 
                  
318
 
                </sect2>
319
 
 
320
 
    </sect1>
321
 
        <sect1 id="network-file-system" status="review">
322
 
                <title>Network File System (NFS)</title>
323
 
          <para>
324
 
          NFS allows a system to share directories and files with others
325
 
          over a network. By using NFS, users and programs can access
326
 
          files on remote systems almost as if they were local files.
327
 
          </para>
328
 
 
329
 
          <para>
330
 
          Some of the most notable benefits that NFS can provide are:
331
 
          </para>
332
 
 
333
 
          <itemizedlist>
334
 
          <listitem>
335
 
      <para>Local workstations use less disk space because commonly used data
336
 
can be stored on a single machine and still remain accessible to others
337
 
over the network.</para>
338
 
          </listitem>
339
 
          <listitem>
340
 
      <para>There is no need for users to have separate home directories on
341
 
every network machine. Home directories could be set up on the NFS
342
 
server and made available throughout the network.</para>
343
 
          </listitem>
344
 
          <listitem>
345
 
 
346
 
      <para>Storage devices such as floppy disks, CDROM drives, and USB
347
 
Thumb drives can be used by other machines on the network. This may
348
 
reduce the number of removable media drives throughout the
349
 
network.</para>
350
 
          </listitem>
351
 
          </itemizedlist>
352
 
 
353
 
      <sect2 id="nfs-installation" status="review">
354
 
        <title>Installation</title>
355
 
      
356
 
          <para>
357
 
          At a terminal prompt enter the following command to install the NFS
358
 
          Server:
359
 
          </para>
360
 
          <para>
361
 
<screen>
362
 
<command>sudo apt-get install nfs-kernel-server</command>
363
 
</screen>
364
 
          </para>
365
 
      </sect2>
366
 
      <sect2 id="nfs-configuration" status="review">
367
 
        <title>Configuration</title>
368
 
          <para>
369
 
          You can configure the directories to be exported by adding them to
370
 
          the <filename>/etc/exports</filename> file. For example:
371
 
          </para>
372
 
          <para>
373
 
<screen>
374
 
/ubuntu  *(ro,sync,no_root_squash)
375
 
/home    *(rw,sync,no_root_squash)
376
 
</screen>
377
 
          </para>
378
 
 
379
 
          <para>
380
 
          You can replace * with one of the hostname formats. Make the
381
 
          hostname declaration as specific as possible so unwanted
382
 
          systems cannot access the NFS mount.
383
 
          </para>
384
 
 
385
 
          <para>
386
 
          To start the NFS server, you can run the following command at a terminal prompt:
387
 
          </para>
388
 
          <para>
389
 
<screen>
390
 
<command>sudo /etc/init.d/nfs-kernel-server start</command>
391
 
</screen>
392
 
          </para>
393
 
      </sect2>
394
 
      <sect2 id="nfs-client-configuration" status="review">
395
 
        <title>NFS Client Configuration</title>
396
 
          <para>
397
 
          Use the <application>mount</application> command to mount a shared NFS directory from
398
 
          another machine, by typing a command line similar to the following at a terminal prompt:
399
 
          </para>
400
 
          <para>
401
 
<screen>
402
 
<command>sudo mount example.hostname.com:/ubuntu /local/ubuntu</command>
403
 
</screen>
404
 
</para>
405
 
      <warning>
406
 
      <para>
407
 
      The mount point directory <filename>/local/ubuntu</filename> must
408
 
      exist. There should be no files or subdirectories in the
409
 
      <filename>/local/ubuntu</filename> directory.
410
 
      </para>
411
 
      </warning>
412
 
 
413
 
      <para>
414
 
       An alternate way to mount an NFS share from another machine is to
415
 
       add a line to the <filename>/etc/fstab</filename> file. The line must state the
416
 
       hostname of the NFS server, the directory on the server being
417
 
       exported, and the directory on the local machine where the NFS
418
 
       share is to be mounted.
419
 
      </para>
420
 
 
421
 
      <para>
422
 
      The general syntax for the line in <filename>/etc/fstab</filename>
423
 
      file is as follows:
424
 
      </para>
425
 
      
426
 
      <para>
427
 
<programlisting>
428
 
example.hostname.com:/ubuntu /local/ubuntu nfs rsize=8192,wsize=8192,timeo=14,intr
429
 
</programlisting>
430
 
      </para>
431
 
          <para>
432
 
          If you have trouble mounting an NFS share, make sure the <application>nfs-common</application> package is 
433
 
          installed on your client.  To install
434
 
          <application>nfs-common</application> enter the following
435
 
          command at the terminal
436
 
          prompt:
437
 
<screen>
438
 
<command>sudo apt-get install nfs-common</command>
439
 
</screen>
440
 
          </para>
441
 
      </sect2>
442
 
      <sect2 id="nfs-references" status="review">
443
 
        <title>References</title>
444
 
                                <para><ulink url="http://nfs.sourceforge.net/">Linux NFS faq</ulink></para>
445
 
                <para>
446
 
                <ulink url="https://help.ubuntu.com/community/NFSv4Howto">Ubuntu Wiki NFS Howto</ulink>
447
 
                </para>
448
 
      </sect2>
449
 
    </sect1>
450
 
 
451
 
        <sect1 id="cups" status="review">
452
 
                <title>CUPS - Print Server</title>
453
 
          <para>
454
 
            The primary mechanism for Ubuntu printing and print services is the 
455
 
                        <emphasis role="bold">Common UNIX Printing System</emphasis> (CUPS). 
456
 
                        This printing system is a freely available, portable printing layer 
457
 
                        which has become the new standard for printing in most Linux 
458
 
                        distributions.
459
 
          </para>
460
 
          <para>
461
 
          CUPS manages print jobs and queues and provides network printing using 
462
 
                  the standard Internet Printing Protocol (IPP), while offering support 
463
 
                  for a very large range of printers, from dot-matrix to laser and many 
464
 
                  in between.  CUPS also supports PostScript Printer Description (PPD) and 
465
 
                  auto-detection of network printers, and features a simple web-based 
466
 
                  configuration and administration tool. 
467
 
          </para>
468
 
      <sect2 id="cups-installation" status="review">
469
 
        <title>Installation</title>
470
 
          <para>
471
 
            To install CUPS on your Ubuntu computer, simply use <application>sudo</application> with the <application>apt-get</application> command and give the packages to install as the first parameter. A complete CUPS install has many package dependencies, but they may all be specified on the same command line.  Enter the following at a terminal prompt to install CUPS:
472
 
          </para>
473
 
          <para>
474
 
<screen>
475
 
<command>sudo apt-get install cups</command>
476
 
</screen>
477
 
          </para>
478
 
          <para>
479
 
          Upon authenticating with your user password, the packages should be downloaded
480
 
                  and installed without error. Upon the conclusion of installation, the CUPS server 
481
 
                  will be started automatically. 
482
 
          </para>
483
 
          <para>
484
 
          For troubleshooting purposes, you can access CUPS 
485
 
                  server errors via the error log file at: <filename>/var/log/cups/error_log</filename>.
486
 
                  If the error log does not show enough information to troubleshoot any problems you
487
 
                  encounter, the verbosity of the CUPS log can be increased by changing the <emphasis
488
 
                  role="bold">LogLevel</emphasis> directive in the configuration file (discussed below)
489
 
                  to "debug" or even "debug2", which logs everything, from the default of "info".  If 
490
 
                  you make this change, remember to change it back once you've solved your problem, to 
491
 
                  prevent the log file from becoming overly large.
492
 
          </para>
493
 
      </sect2>
494
 
      <sect2 id="cups-configuration" status="review">
495
 
        <title>Configuration</title>
496
 
          <para>
497
 
            The Common UNIX Printing System server's behavior is configured through the 
498
 
                        directives contained in the file <filename>/etc/cups/cupsd.conf</filename>.  
499
 
                        The CUPS configuration file follows the same syntax as the primary configuration 
500
 
                        file for the Apache HTTP server, so users familiar with editing Apache's 
501
 
                        configuration file should feel at ease when editing the CUPS configuration 
502
 
                        file. Some examples of settings you may wish to change initially will be 
503
 
                        presented here.
504
 
          </para>
505
 
          <tip>
506
 
               <para>Prior to editing the configuration file, you should make a copy of 
507
 
                           the original file and protect it from writing, so you will have the original 
508
 
                           settings as a reference, and to reuse as necessary.
509
 
               </para>
510
 
               <para>Copy the <filename>/etc/cups/cupsd.conf</filename> file and protect it 
511
 
                           from writing with the following commands, issued at a terminal prompt:
512
 
               </para>
513
 
               </tip>
514
 
               <para>
515
 
<screen>
516
 
<command>sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original</command>
517
 
<command>sudo chmod a-w /etc/cups/cupsd.conf.original</command>
518
 
</screen>
519
 
               </para>
520
 
          <itemizedlist>
521
 
                <listitem>
522
 
                <para>
523
 
                <emphasis role="bold">ServerAdmin</emphasis>: To configure the email 
524
 
                                address of the designated administrator of the CUPS server, simply 
525
 
                                edit the <filename>/etc/cups/cupsd.conf</filename> configuration file 
526
 
                                with your preferred text editor, and add or modify the <emphasis 
527
 
                                role="italics">ServerAdmin</emphasis> line accordingly.  For example, 
528
 
                                if you are the Administrator for the CUPS server, and your e-mail 
529
 
                                address is 'bjoy@somebigco.com', then you would modify the ServerAdmin 
530
 
                                line to appear as such:
531
 
                </para>
532
 
                <para>
533
 
<screen>
534
 
ServerAdmin bjoy@somebigco.com
535
 
</screen>
536
 
                </para>
537
 
                </listitem>
538
 
                <listitem>
539
 
                <para>
540
 
                <emphasis role="bold">Listen</emphasis>: By default on Ubuntu, the CUPS 
541
 
                                server installation listens only on the loopback interface at IP address 
542
 
                                <emphasis>127.0.0.1</emphasis>. In order to instruct the 
543
 
                                CUPS server to listen on an actual network adapter's IP address, you must 
544
 
                                specify either a hostname, the IP address, or optionally, an IP 
545
 
                                address/port pairing via the addition of a Listen directive.  For example, 
546
 
                                if your CUPS server resides on a local network at the IP address <emphasis 
547
 
                                role="italics">192.168.10.250</emphasis> and you'd like to make it 
548
 
                                accessible to the other systems on this subnetwork, you would edit the 
549
 
                                <filename>/etc/cups/cupsd.conf</filename> and add a Listen 
550
 
                                directive, as such:
551
 
                </para>
552
 
                <para>
553
 
<screen>
554
 
Listen 127.0.0.1:631           # existing loopback Listen
555
 
Listen /var/run/cups/cups.sock # existing socket Listen
556
 
Listen 192.168.10.250:631      # Listen on the LAN interface, Port 631 (IPP)
557
 
</screen>
558
 
                </para>
559
 
                <para>
560
 
                In the example above, you may comment out or remove the reference to the 
561
 
                                Loopback address (127.0.0.1) if you do not wish <application>cupsd
562
 
                                </application> to listen on that interface, but would rather have it only 
563
 
                                listen on the Ethernet interfaces of the Local Area Network (LAN). To enable 
564
 
                                listening for all network interfaces for which a certain hostname is bound, 
565
 
                                including the Loopback, you could create a Listen entry for the hostname 
566
 
                                <emphasis>socrates</emphasis> as such:
567
 
                </para>
568
 
                <para>
569
 
<screen>
570
 
Listen socrates:631  # Listen on all interfaces for the hostname 'socrates'
571
 
</screen>
572
 
                </para> 
573
 
                                <para>or by omitting the Listen directive and using <emphasis>Port</emphasis> instead, as in:</para>
574
 
<para>
575
 
<screen>
576
 
Port 631  # Listen on port 631 on all interfaces
577
 
</screen>
578
 
</para>
579
 
                </listitem>
580
 
        </itemizedlist>
581
 
 
582
 
                <para>
583
 
                For more examples of configuration directives in the CUPS server 
584
 
                                configuration file, view the associated system manual page by entering the 
585
 
                                following command at a terminal prompt:
586
 
               </para>
587
 
               <para>
588
 
<screen>
589
 
<command>man cupsd.conf</command>
590
 
</screen>
591
 
               </para>
592
 
                               <note>
593
 
                <para>
594
 
                Whenever you make changes to the <filename>/etc/cups/cupsd.conf</filename> configuration file, you'll need to restart the CUPS server by typing the following command at a terminal prompt:
595
 
                </para>
596
 
                </note>
597
 
                <para>
598
 
<screen>
599
 
<command>sudo /etc/init.d/cups restart</command>
600
 
</screen>
601
 
                </para>
602
 
      </sect2>
603
 
 
604
 
      <sect2 id="cups-web" status="review">
605
 
        <title>Web Interface</title>
606
 
          <tip>
607
 
            <para>
608
 
            CUPS can be configured and monitored using a web interface, which by default is available at <ulink url="http://localhost:631/admin">http://localhost:631/admin</ulink>.  The web interface can be used to perform all printer management tasks.
609
 
            </para>
610
 
          </tip>
611
 
          <para>
612
 
          In order to perform administrative tasks via the web interface, you must either have the root account enabled on your server, or authenticate as a user in the <emphasis role="italic">lpadmin</emphasis> group.  For security reasons, CUPS won't authenticate a user that doesn't have a password.
613
 
          </para>
614
 
          <para>
615
 
          To add a user to the <emphasis role="italic">lpadmin</emphasis> group, run at the terminal prompt:
616
 
<screen>
617
 
<command>sudo usermod -aG lpadmin username</command>
618
 
</screen>
619
 
          </para>
620
 
          <para>
621
 
            Further documentation is available in the <emphasis role="italic">Documentation/Help</emphasis> tab of the web interface.
622
 
          </para>
623
 
      </sect2>
624
 
 
625
 
      <sect2 id="cups-references" status="review">
626
 
        <title>References</title>
627
 
        <para>
628
 
        <ulink url="http://www.cups.org/">CUPS Website</ulink>
629
 
        </para>
630
 
        <para>
631
 
        <ulink url="https://help.ubuntu.com/community/cups">Ubuntu Wiki CUPS page</ulink>
632
 
        </para>
633
 
        </sect2>
634
 
    </sect1>
635
 
 
636
 
</chapter>
637