~ubuntu-branches/ubuntu/lucid/samba/lucid-proposed

« back to all changes in this revision

Viewing changes to docs/htmldocs/Samba-Developers-Guide/unix-smb.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-07-21 17:53:23 UTC
  • mfrom: (0.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050721175323-m3oh6aoigywohfnq
Tags: 3.0.14a-6ubuntu1
Resynchronise with Debian, resolving merge conflicts (#12360)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�2.�NetBIOS in a Unix World</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt01.html" title="Part�I.�The protocol"><link rel="previous" href="netbios.html" title="Chapter�1.�Definition of NetBIOS Protocol and Name Resolution Modes"><link rel="next" href="ntdomain.html" title="Chapter�3.�NT Domain RPC's"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�2.�NetBIOS in a Unix World</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="netbios.html">Prev</a>�</td><th width="60%" align="center">Part�I.�The protocol</th><td width="20%" align="right">�<a accesskey="n" href="ntdomain.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="unix-smb"></a>Chapter�2.�NetBIOS in a Unix World</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3></div></div><div><p class="pubdate">April 1995</p></div></div><div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="unix-smb.html#id2444583">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2444604">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2506202">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2506233">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2506270">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2506322">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2506348">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2506368">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2506413">Protocol Complexity</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2444583"></a>Introduction</h2></div></div><div></div></div><p>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�2.�NetBIOS in a Unix World</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt01.html" title="Part�I.�The protocol"><link rel="prev" href="netbios.html" title="Chapter�1.�Definition of NetBIOS Protocol and Name Resolution Modes"><link rel="next" href="ntdomain.html" title="Chapter�3.�NT Domain RPC's"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�2.�NetBIOS in a Unix World</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="netbios.html">Prev</a>�</td><th width="60%" align="center">Part�I.�The protocol</th><td width="20%" align="right">�<a accesskey="n" href="ntdomain.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="unix-smb"></a>Chapter�2.�NetBIOS in a Unix World</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Andrew</span> <span class="surname">Tridgell</span></h3></div></div><div><p class="pubdate">April 1995</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="unix-smb.html#id2464982">Introduction</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2465002">Usernames</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2465061">File Ownership</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2465093">Passwords</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2465130">Locking</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2465183">Deny Modes</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2526290">Trapdoor UIDs</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2526311">Port numbers</a></span></dt><dt><span class="sect1"><a href="unix-smb.html#id2526356">Protocol Complexity</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2464982"></a>Introduction</h2></div></div></div><p>
2
2
This is a short document that describes some of the issues that
3
3
confront a SMB implementation on unix, and how Samba copes with
4
4
them. They may help people who are looking at unix&lt;-&gt;PC
6
6
</p><p>
7
7
It was written to help out a person who was writing a paper on unix to
8
8
PC connectivity.
9
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2444604"></a>Usernames</h2></div></div><div></div></div><p>
 
9
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2465002"></a>Usernames</h2></div></div></div><p>
10
10
The SMB protocol has only a loose username concept. Early SMB
11
11
protocols (such as CORE and COREPLUS) have no username concept at
12
12
all. Even in later protocols clients often attempt operations
43
43
service%user syntax, the saving of session setup usernames for later
44
44
validation and the derivation of the username from the service name
45
45
(either directly or via the user= option).
46
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2506202"></a>File Ownership</h2></div></div><div></div></div><p>
 
46
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2465061"></a>File Ownership</h2></div></div></div><p>
47
47
The commonly used SMB protocols have no way of saying "you can't do
48
48
that because you don't own the file". They have, in fact, no concept
49
49
of file ownership at all.
61
61
There are several possible solutions to this problem, including
62
62
username mapping, and forcing a specific username for particular
63
63
shares.
64
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2506233"></a>Passwords</h2></div></div><div></div></div><p>
 
64
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2465093"></a>Passwords</h2></div></div></div><p>
65
65
Many SMB clients uppercase passwords before sending them. I have no
66
66
idea why they do this. Interestingly WfWg uppercases the password only
67
67
if the server is running a protocol greater than COREPLUS, so
83
83
smbpasswd file containing these password hashes is only readable
84
84
by the root user. See the documentation ENCRYPTION.txt for more
85
85
details.
86
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2506270"></a>Locking</h2></div></div><div></div></div><p>
 
86
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2465130"></a>Locking</h2></div></div></div><p>
87
87
Since samba 2.2, samba supports other types of locking as well. This 
88
88
section is outdated.
89
89
</p><p>
114
114
the same file, at which time the client will say if it is willing to
115
115
give up its lock. Unix has no simple way of implementing
116
116
opportunistic locking, and currently Samba has no support for it.
117
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2506322"></a>Deny Modes</h2></div></div><div></div></div><p>
 
117
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2465183"></a>Deny Modes</h2></div></div></div><p>
118
118
When a SMB client opens a file it asks for a particular "deny mode" to
119
119
be placed on the file. These modes (DENY_NONE, DENY_READ, DENY_WRITE,
120
120
DENY_ALL, DENY_FCB and DENY_DOS) specify what actions should be
128
128
is clumsy and consumes processing and file resources,
129
129
the shared memory implementation is vastly prefered and is turned on
130
130
by default for those systems that support it.
131
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2506348"></a>Trapdoor UIDs</h2></div></div><div></div></div><p>
 
131
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2526290"></a>Trapdoor UIDs</h2></div></div></div><p>
132
132
A SMB session can run with several uids on the one socket. This
133
133
happens when a user connects to two shares with different
134
134
usernames. To cope with this the unix server needs to switch uids
138
138
</p><p>
139
139
Note that you can also get the "trapdoor uid" message for other
140
140
reasons. Please see the FAQ for details.
141
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2506368"></a>Port numbers</h2></div></div><div></div></div><p>
142
 
There is a convention that clients on sockets use high "unprivilaged"
143
 
port numbers (&gt;1000) and connect to servers on low "privilaged" port
 
141
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2526311"></a>Port numbers</h2></div></div></div><p>
 
142
There is a convention that clients on sockets use high "unprivileged"
 
143
port numbers (&gt;1000) and connect to servers on low "privilegedg" port
144
144
numbers. This is enforced in Unix as non-root users can't open a
145
145
socket for listening on port numbers less than 1000.
146
146
</p><p>
161
161
back, but it goes to port 137 which the unix user can't listen
162
162
on. Interestingly WinNT3.1 got this right - it sends node status
163
163
responses back to the source port in the request.
164
 
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2506413"></a>Protocol Complexity</h2></div></div><div></div></div><p>
 
164
</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2526356"></a>Protocol Complexity</h2></div></div></div><p>
165
165
There are many "protocol levels" in the SMB protocol. It seems that
166
166
each time new functionality was added to a Microsoft operating system,
167
167
they added the equivalent functions in a new protocol level of the SMB