This file is indexed.

/usr/share/doc/kde/HTML/en/kubuntu/sharing/samba-ad-integration.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
<html><head><title>Samba Active Directory Integration</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="samba-dc.html" title="Samba as a Domain Controller"><link rel="next" href="likewise-open.html" title="Likewise Open"><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 Active Directory Integration</div></div></div></div><div class="navCenter"><table class="navigation"><tr><td class="prevCell"><a accesskey="p" href="samba-dc.html">Prev</a></td><td class="upCell"> </td><td class="nextCell"><a accesskey="n" href="likewise-open.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-ad-integration"></a>Samba Active Directory Integration</h2></div></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="ad-integration-samba-share"></a>Accessing a Samba Share</h3></div></div></div><p>
Another use for <span class="application">Samba</span> is to integrate into an 
existing <span class="trademark">Windows</span>® network. Once part 
of an <span class="trademark">Active Directory</span>® 
(<acronym class="acronym">AD</acronym>) domain, <span class="application">Samba</span> can provide 
file and print services to <acronym class="acronym">AD</acronym> users.
</p><p>
The simplest way to join an <acronym class="acronym">AD</acronym> domain is to use
<span class="application">Likewise-open</span>. For detailed instructions, see <a class="xref" href="likewise-open.html" title="Likewise Open">the section called &#8220;Likewise Open&#8221;</a>.
</p><p>
Once part of the domain, enter the following command in the terminal prompt:
</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 smbfs smbclient</strong></span></span>
</pre><p>
Since the <span class="application">likewise-open</span> and 
<span class="application">samba</span> packages use separate 
<code class="filename">secrets.tdb</code> files, a symlink must be created in <code class="filename">/var/lib/samba</code>:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>sudo mv /var/lib/samba/secrets.tdb /var/lib/samba/secrets.tdb.orig
</strong></span></span>
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>sudo ln -s /etc/samba/secrets.tdb /var/lib/samba</strong></span></span>
</pre><p>
Next, edit <code class="filename">/etc/samba/smb.conf</code> changing:
</p><pre class="programlisting">
workgroup = EXAMPLE
...
security = ads
realm = EXAMPLE.COM
...
idmap backend = lwopen
idmap uid = 50-9999999999
idmap gid = 50-9999999999
</pre><p>
Restart <span class="application">samba</span> for the new settings to take effect:
</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><p>
It should now be possible to access any <span class="application">Samba</span> shares
from a <span class="trademark">Windows</span>® client. However, be 
sure to give the appropriate <acronym class="acronym">AD</acronym> users or groups access to 
the share directory.  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> for more 
details.
</p></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="ad-integration-windows-share"></a>Accessing a Windows Share</h3></div></div></div><p>
Now that the <span class="application">Samba</span> server is part of the <span class="trademark">Active Directory</span>® domain, any <span class="trademark">Windows</span>® server shares can be accessed:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
To mount a <span class="trademark">Windows</span>® file share, enter 
the following in a terminal prompt:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>mount.cifs //fs01.example.com/share mount_point</strong></span></span>
</pre><p>
It is also possible to access shares on computers not part of an 
<acronym class="acronym">AD</acronym> domain, but a username and password must be provided.
</p></li><li class="listitem"><p>
To mount the share during boot, place an entry in
<code class="filename">/etc/fstab</code>. For example:
</p><pre class="programlisting">
//192.168.0.5/share /mnt/windows cifs auto,username=steve,password=secret,rw 0        0
</pre></li><li class="listitem"><p>
Another way to copy files from a <span class="trademark">Windows</span>® server is to use the
<span class="application">smbclient</span> utility. To list the files in a <span class="trademark">Windows</span>® share:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>smbclient //fs01.example.com/share -k -c "ls"</strong></span></span>
</pre></li><li class="listitem"><p>
To copy a file from the share, enter:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>smbclient //fs01.example.com/share -k -c "get file.txt"</strong></span></span>
</pre><p>
This will copy the <code class="filename">file.txt</code> into the current directory.
</p></li><li class="listitem"><p>
And to copy a file to the share:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>smbclient //fs01.example.com/share -k -c "put /etc/hosts hosts"
</strong></span></span>
</pre><p>
This will copy the <code class="filename">/etc/hosts</code> to 
<code class="filename">//fs01.example.com/share/hosts</code>.
</p></li><li class="listitem"><p>
The <span class="emphasis"><em>-c</em></span> option used above allows execution of the
<span class="application">smbclient</span> command all at once. This is useful for 
scripting and minor file operations. To enter the <span class="emphasis"><em>smb:
\&gt;</em></span> prompt, an <acronym class="acronym">FTP</acronym>-like prompt where normal 
file and directory commands can be executed, simply run the following in 
<span class="application">Konsole</span>:
</p><pre class="screen">
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>smbclient //fs01.example.com/share -k</strong></span></span>
</pre></li></ul></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Replace all instances of <span class="emphasis"><em>fs01.example.com/share</em></span>, 
<span class="emphasis"><em>//192.168.0.5/share</em></span>, 
<span class="emphasis"><em>username=steve,password=secret</em></span>, and
<span class="emphasis"><em>file.txt</em></span> with the proper server <acronym class="acronym">IP</acronym>, 
hostname, share name, file name, and an actual username and password with 
rights to the share.
</p></div></div><div class="sect2"><div class="titlepage"><div><div><h3 class="title"><a name="ad-integration-resources"></a>Resources</h3></div></div></div><p>
For more <span class="application">smbclient</span> options, see the man page:
<span xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" class="command"><span class="command"><strong>man smbclient</strong></span></span>, also available
<a class="ulink" href="http://manpages.ubuntu.com/manpages/jaunty/en/man1/smbclient.1.html" target="_top">
online</a>.
</p><p>
The <span class="application">mount.cifs</span> 
<a class="ulink" href="http://manpages.ubuntu.com/manpages/jaunty/en/man8/mount.cifs.8.html" target="_top">man
page</a> is also useful for more detailed information.
</p></div></div></div><div id="footer"><div class="navCenter"><table class="navigation"><tr><td class="prevCell"><a accesskey="p" href="samba-dc.html">Prev</a></td><td class="upCell"><a accesskey="h" href="index.html">Home</a></td><td class="nextCell"><a accesskey="n" href="likewise-open.html">Next</a></td></tr><tr><td class="prevCell">Samba as a Domain Controller </td><td class="upCell"> </td><td class="nextCell"> Likewise Open</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>