This file is indexed.

/usr/share/doc/kde/HTML/en/kubuntu/sharing/samba-fileserver.html is in kubuntu-docs 12.04.0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<html><head><title>Samba File Server</title><link rel="stylesheet" type="text/css" href="help:/common/kde-default.css"><link rel="stylesheet" type="text/css" href="help:/common/kde-docs.css"><link rel="stylesheet" type="text/css" href="help:/common/kde-localised.css"><link rel="stylesheet" type="text/css" href="help:/common/kubuntu.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="File Sharing in Kubuntu"><link rel="up" href="index.html" title="File Sharing in Kubuntu"><link rel="prev" href="index.html" title="File Sharing in Kubuntu"><link rel="next" href="samba-fileprint-security.html" title="Securing a Samba File and Print Server"><link rel="copyright" href="legal.html" title="Credits and License"><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><meta name="GENERATOR" content="KDE XSL Stylesheet V1.14 using libxslt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div id="content"><div id="header"><div id="header_content"><div id="header_left"><div id="header_right"><img src="help:/common/top-kde.jpg" width="36" height="34"> Samba File Server</div></div></div></div><div class="navCenter"><table class="navigation"><tr><td class="prevCell"><a accesskey="p" href="index.html">Prev</a></td><td class="upCell"> </td><td class="nextCell"><a accesskey="n" href="samba-fileprint-security.html">Next</a></td></tr></table></div><div id="contentBody"><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="samba-fileserver"></a>Samba File Server</h2></div></div></div><p>
One of the most common ways to network <span>Kubuntu</span> and <span class="trademark">Windows</span>® computers is to configure 
<span class="application">Samba</span> as a file server. This section covers setting 
up a <span class="application">Samba</span> server to share files with <span class="trademark">Windows</span>® clients.
</p><p>
The server will be configured to share files with any client on the network
without prompting for a password.  If the environment requires stricter access
controls, see <a class="xref" href="samba-fileprint-security.html" title="Securing a Samba File and Print Server">the section called &#8220;Securing a Samba File and Print Server&#8221;</a>.
</p><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="samba-fileserver-installation"></a>Installation</h3></div></div></div><p>
The first step is to install the <span class="application">samba</span> package. From 
a terminal prompt, enter:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>sudo apt-get install samba</strong></span></span>
</pre><p>
That's all there is to it. <span class="application">Samba</span> is ready to be 
configured for file sharing.
</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="samba-fileserver-configuration"></a>Configuration</h3></div></div></div><p>
The main <span class="application">Samba</span> configuration file is located in
<code class="filename">/etc/samba/smb.conf</code>. The default configuration file has a
significant number of comments in order to document various configuration
directives.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Not all of the available options are included in the default configuration 
file. See the <code class="filename">smb.conf</code> <span class="application">man</span> page 
or the <a class="ulink" href="http://samba.org/samba/docs/man/Samba-HOWTO-Collection/" target="_top">
<span class="application">Samba</span> HOWTO Collection</a> for more details.
</p></div><div class="procedure"><ol class="procedure" type="1"><li class="step"><p>
Edit the following key/value pairs in the <span class="emphasis"><em>[global]</em></span> section
of <code class="filename">/etc/samba/smb.conf</code>:
</p><pre class="programlisting">
workgroup = EXAMPLE
...
security = user
</pre><p>
The <span class="emphasis"><em>security</em></span> parameter is farther down in the [global]
section, and is commented out by default. Change <span class="emphasis"><em>EXAMPLE</em></span> 
to match the actual environment.
</p></li><li class="step"><p>
Create a new section at the bottom of the file, or uncomment one of the
examples for the directory to be shared:
</p><pre class="programlisting">
[share]
comment = Ubuntu File Server Share
path = /srv/samba/share
browsable = yes
guest ok = yes
read only = no
create mask = 0755
</pre><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
<span class="emphasis"><em>comment:</em></span> a short description of the share. Adjust to fit
as appropriate.
</p></li><li class="listitem"><p>
<span class="emphasis"><em>path:</em></span> the path to the directory to share. 
</p><p>
This example uses <code class="filename">/srv/samba/sharename</code> because, according
to the  <span class="emphasis"><em>Filesystem Hierarchy Standard (FHS)</em></span>, 
<a class="ulink" href="http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM" target="_top">
/srv</a> is where site-specific data should be served. Technically, 
<span class="application">Samba</span> shares can be placed anywhere on the 
filesystem as long as the permissions are correct, but adhering to standards is 
recommended.
</p></li><li class="listitem"><p>
<span class="emphasis"><em>browsable:</em></span> enables <span class="trademark">Windows</span>® clients to browse the shared directory 
using <span class="application">Windows Explorer</span>.
</p></li><li class="listitem"><p>
<span class="emphasis"><em>guest ok:</em></span> allows clients to connect to the share without
supplying a password.
</p></li><li class="listitem"><p>
<span class="emphasis"><em>read only:</em></span> determines if the share is read only or if 
write privileges are granted. Write privileges are allowed only when the value 
is <span class="emphasis"><em>no</em></span>, as is seen in this example. If the value is 
<span class="emphasis"><em>yes</em></span>, then access to the share is read only.
</p></li><li class="listitem"><p>
<span class="emphasis"><em>create mask:</em></span> determines the permissions new files will 
have when created.
</p></li></ul></div></li><li class="step"><p> 
Now that <span class="application">Samba</span> is configured, the directory needs to
be created and the permissions changed. From a terminal, enter:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>sudo mkdir -p /srv/samba/share</strong></span></span>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>sudo chown nobody.nogroup /srv/samba/share/</strong></span></span>
</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
The <span class="emphasis"><em>-p</em></span> switch tells <span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>mkdir</strong></span></span> to create the 
entire directory tree if it doesn't exist. Change the share name to fit the 
environment.
</p></div></li><li class="step"><p>
Finally, restart the <span class="application">samba</span> services to enable the 
new configuration:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>sudo /etc/init.d/samba restart</strong></span></span>
</pre></li></ol></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
The above configuration gives all access to any client on the local network. 
For a more secure configuration, see <a class="xref" href="samba-fileprint-security.html" title="Securing a Samba File and Print Server">the section called &#8220;Securing a Samba File and Print Server&#8221;</a>.
</p></div><p>
From a <span class="trademark">Windows</span>® client, it should now 
be possible to browse to the <span>Kubuntu</span> file server and see the shared 
directory. To check that everything is working, try creating a directory from 
<span class="trademark">Windows</span>®. 
</p><p>
To create additional shares, simply create new <span class="emphasis"><em>[dir]</em></span>
sections in <code class="filename">/etc/samba/smb.conf</code>, and restart
<span class="emphasis"><em>Samba</em></span>. Make sure that the directory to be shared actually
exists and that the permissions are correct.
</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="samba-fileserver-resources"></a>Resources</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
For in depth Samba configurations see the 
<a class="ulink" href="http://samba.org/samba/docs/man/Samba-HOWTO-Collection/" target="_top">Samba 
HOWTO Collection</a>
</p></li><li class="listitem"><p>
The guide is also available in <a class="ulink" href="http://www.amazon.com/exec/obidos/tg/detail/-/0131882228" target="_top">printed 
format</a>.
</p></li><li class="listitem"><p>
O'Reilly's <a class="ulink" href="http://www.oreilly.com/catalog/9780596007690/" target="_top">Using
Samba</a> is another good reference.
</p></li></ul></div></div></div></div><div id="footer"><div class="navCenter"><table class="navigation"><tr><td class="prevCell"><a accesskey="p" href="index.html">Prev</a></td><td class="upCell"><a accesskey="h" href="index.html">Home</a></td><td class="nextCell"><a accesskey="n" href="samba-fileprint-security.html">Next</a></td></tr><tr><td class="prevCell">File Sharing in <span>Kubuntu</span> </td><td class="upCell"> </td><td class="nextCell"> Securing a Samba File and Print Server</td></tr></table></div><div id="footer_text"><br><a href="mailto:ubuntu-docs@lists.ubuntu.com" class="footer_email">
	  Ubuntu Documentation Project
        </a></div></div></div></body></html>