~ubuntu-branches/ubuntu/intrepid/samba/intrepid-updates

« back to all changes in this revision

Viewing changes to docs-xml/Samba3-HOWTO/TOSHARG-Portability.xml

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-06-02 09:01:46 UTC
  • mfrom: (0.25.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080602090146-92ur4nx39ccg708r
Tags: 2:3.0.30-2ubuntu1
* Merge from debian unstable, remaining changes:
  * debian/patches/VERSION.patch
    - set SAMABA_VERSION_VENDOR_SUFFIX to Ubuntu
  * debian/smb.conf
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] shares, and a comment about
      "value users = %S to show users how to restrict access to 
      \\server\useranem to only username.
    - Add map to guest = Bad user, maps bad username to guest access.
      (LP: #32067)
  * debian/samba-common.postinst:
    - Fix upgrade from a first installation done with feisty, edgy, or dapper.
      (LP: #201059)
    - When populating the new sambashare group, it's not an error if the user
      simply doesn't exist; test for this case and the install continue 
      instead of aborting. (LP: #206036)
  * debian/smba-common.config:
    - do not change priority to HIGH if dhclient3 is installed
    - used priority medium instead of hight for the workgroup question
  * debian/winbind.files
    - insclude additional files
  * debian/patches/fix-documentation.patch:
    - fix typos in net(8) and smb.conf(5) man pages
  * debian/mksambapasswd.awk:
    - Don't add user with UID less than 1000 to smbpasswd.
  * debian/samba.init:
    - add 'status' option for LSB conformance.
  * Updated control version.
  * Dropped Changes:
    - Dropped debian/patches/fix-smbprinting-os2.patch. Accepted upstream.
    - Dropped debian/patches/fix-documentation.patch. Accepted upstream.
     

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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="Portability">
 
4
<chapterinfo>
 
5
        &author.jelmer;
 
6
        &author.jht;
 
7
        <!-- Some other people as well, but there were no author names in the text files this file is based on-->
 
8
</chapterinfo>
 
9
 
 
10
<title>Portability</title>
 
11
 
 
12
<para>
 
13
<indexterm><primary>platforms</primary></indexterm>
 
14
<indexterm><primary>compatible</primary></indexterm>
 
15
Samba works on a wide range of platforms, but the interface all the 
 
16
platforms provide is not always compatible. This chapter contains 
 
17
platform-specific information about compiling and using Samba.</para>
 
18
 
 
19
<sect1>
 
20
<title>HPUX</title>
 
21
 
 
22
<para>
 
23
<indexterm><primary>/etc/logingroup</primary></indexterm>
 
24
<indexterm><primary>/etc/group</primary></indexterm>
 
25
Hewlett-Packard's implementation of supplementary groups is nonstandard (for
 
26
historical reasons). There are two group files, <filename>/etc/group</filename> and
 
27
<filename>/etc/logingroup</filename>; the system maps UIDs to numbers using the former, but
 
28
initgroups() reads the latter. Most system admins who know the ropes
 
29
symlink <filename>/etc/group</filename> to <filename>/etc/logingroup</filename>
 
30
(hard-link does not work for reasons too obtuse to go into here). initgroups() will complain if one of the
 
31
groups you're in, in <filename>/etc/logingroup</filename>, has what it considers to be an invalid
 
32
ID, which means outside the range <constant>[0..UID_MAX]</constant>, where <constant>UID_MAX</constant> is
 
33
60000 currently on HP-UX. This precludes -2 and 65534, the usual <constant>nobody</constant>
 
34
GIDs.
 
35
</para>
 
36
 
 
37
<para>
 
38
If you encounter this problem, make sure the programs that are failing 
 
39
to initgroups() are run as users, not in any groups with GIDs outside the 
 
40
allowed range.
 
41
</para>
 
42
 
 
43
<para>
 
44
This is documented in the HP manual pages under setgroups(2) and passwd(4).
 
45
</para>
 
46
 
 
47
<para>
 
48
<indexterm><primary>gcc</primary></indexterm>
 
49
<indexterm><primary>ANSI compiler</primary></indexterm>
 
50
On HP-UX you must use gcc or the HP ANSI compiler. The free compiler
 
51
that comes with HP-UX is not ANSI compliant and cannot compile Samba.
 
52
</para>
 
53
 
 
54
</sect1>
 
55
 
 
56
<sect1>
 
57
<title>SCO UNIX</title>
 
58
 
 
59
<para> 
 
60
If you run an old version of SCO UNIX, you may need to get important 
 
61
TCP/IP patches for Samba to work correctly. Without the patch, you may 
 
62
encounter corrupt data transfers using Samba.
 
63
</para>
 
64
 
 
65
<para>
 
66
The patch you need is UOD385 Connection Drivers SLS. It is available from
 
67
SCO <ulink noescape="1" url="ftp://ftp.sco.com/">ftp.sco.com</ulink>, directory SLS,
 
68
files uod385a.Z and uod385a.ltr.Z).
 
69
</para>
 
70
 
 
71
<para>
 
72
The information provided here refers to an old version of SCO UNIX. If you require
 
73
binaries for more recent SCO UNIX products, please contact SCO to obtain packages that are
 
74
ready to install. You should also verify with SCO that your platform is up to date for the
 
75
binary packages you will install. This is important if you wish to avoid data corruption
 
76
problems with your installation. To build Samba for SCO UNIX products  may
 
77
require significant patching of Samba source code. It is much easier to obtain binary
 
78
packages directly from SCO.
 
79
</para>
 
80
 
 
81
</sect1>
 
82
 
 
83
<sect1>
 
84
<title>DNIX</title>
 
85
 
 
86
<para>
 
87
DNIX has a problem with seteuid() and setegid(). These routines are
 
88
needed for Samba to work correctly, but they were left out of the DNIX
 
89
C library for some reason.
 
90
</para>
 
91
 
 
92
<para>
 
93
For this reason Samba by default defines the macro NO_EID in the DNIX
 
94
section of includes.h. This works around the problem in a limited way,
 
95
but it is far from ideal, and some things still will not work right.
 
96
</para>
 
97
 
 
98
<para> 
 
99
To fix the problem properly, you need to assemble the following two
 
100
functions and then either add them to your C library or link them into
 
101
Samba. Put the following in the file <filename>setegid.s</filename>:
 
102
</para>
 
103
 
 
104
<para><programlisting>
 
105
        .globl  _setegid
 
106
_setegid:
 
107
        moveq   #47,d0
 
108
        movl    #100,a0
 
109
        moveq   #1,d1
 
110
        movl    4(sp),a1
 
111
        trap    #9
 
112
        bccs    1$
 
113
        jmp     cerror
 
114
1$:
 
115
        clrl    d0
 
116
        rts
 
117
</programlisting></para>
 
118
 
 
119
<para>
 
120
Put this in the file <filename>seteuid.s</filename>:
 
121
</para>
 
122
 
 
123
<para><programlisting>
 
124
        .globl  _seteuid
 
125
_seteuid:
 
126
        moveq   #47,d0
 
127
        movl    #100,a0
 
128
        moveq   #0,d1
 
129
        movl    4(sp),a1
 
130
        trap    #9
 
131
        bccs    1$
 
132
        jmp     cerror
 
133
1$:
 
134
        clrl    d0
 
135
        rts
 
136
</programlisting></para>
 
137
 
 
138
<para>
 
139
After creating the files, you then assemble them using
 
140
</para>
 
141
 
 
142
<screen>
 
143
&prompt;<userinput>as seteuid.s</userinput>
 
144
&prompt;<userinput>as setegid.s</userinput>
 
145
</screen>
 
146
 
 
147
<para>
 
148
which should produce the files <filename>seteuid.o</filename> and
 
149
<filename>setegid.o</filename>.
 
150
</para>
 
151
 
 
152
<para>
 
153
Next you need to add these to the LIBSM line in the DNIX section of
 
154
the Samba Makefile. Your LIBSM line will look something like this:
 
155
</para>
 
156
 
 
157
<para><programlisting>
 
158
LIBSM = setegid.o seteuid.o -ln
 
159
</programlisting></para>
 
160
 
 
161
<para>
 
162
You should then remove the line:
 
163
</para>
 
164
 
 
165
<para><programlisting>
 
166
#define NO_EID
 
167
</programlisting></para>
 
168
 
 
169
<para>from the DNIX section of <filename>includes.h</filename>.</para>
 
170
 
 
171
</sect1>
 
172
 
 
173
<sect1>
 
174
<title>Red Hat Linux</title>
 
175
 
 
176
<para>
 
177
By default during installation, some versions of Red Hat Linux add an
 
178
entry to <filename>/etc/hosts</filename> as follows:
 
179
<programlisting>
 
180
127.0.0.1 loopback "hostname"."domainname"
 
181
</programlisting>
 
182
</para>
 
183
 
 
184
<para>
 
185
<indexterm><primary>loopback interface</primary></indexterm>
 
186
This causes Samba to loop back onto the loopback interface.
 
187
The result is that Samba fails to communicate correctly with
 
188
the world and therefore may fail to correctly negotiate who
 
189
is the master browse list holder and who is the master browser.
 
190
</para>
 
191
 
 
192
<para>
 
193
Corrective action: Delete the entry after the word "loopback"
 
194
in the line starting 127.0.0.1.
 
195
</para>
 
196
</sect1>
 
197
 
 
198
<sect1>
 
199
<title>AIX: Sequential Read Ahead</title>
 
200
<!-- From an email by William Jojo <jojowil@hvcc.edu> -->
 
201
<para>
 
202
Disabling sequential read ahead can improve Samba performance significantly
 
203
when there is a relatively high level of multiprogramming (many smbd processes
 
204
or mixed with another workload), not an abundance of physical memory or slower
 
205
disk technology. These can cause AIX to have a higher WAIT values. Disabling
 
206
sequential read-ahead can also have an adverse affect on other workloads in the
 
207
system so you will need to evaluate other applications for impact.
 
208
</para>
 
209
 
 
210
<para>
 
211
It is recommended to use the defaults provided by IBM, but if you experience a
 
212
high amount of wait time, try disabling read-ahead with the following commands:
 
213
</para>
 
214
 
 
215
<para>
 
216
For AIX 5.1 and earlier: <userinput>vmtune -r 0</userinput>
 
217
</para>
 
218
 
 
219
<para>
 
220
For AIX 5.2 and later jfs filesystems: <userinput>ioo -o minpgahead=0</userinput>
 
221
</para>
 
222
 
 
223
<para>
 
224
For AIX 5.2 and later jfs2 filesystems: <userinput>ioo -o j2_minPageReadAhead=0</userinput>
 
225
</para>
 
226
 
 
227
<para>
 
228
If you have a mix of jfs and jfs2 filesystems on the same host, simply use both
 
229
ioo commands.
 
230
</para>
 
231
</sect1>
 
232
 
 
233
<sect1>
 
234
<title>Solaris</title>
 
235
 
 
236
<sect2>
 
237
<title>Locking Improvements</title>
 
238
 
 
239
<para>Some people have been experiencing problems with F_SETLKW64/fcntl 
 
240
when running Samba on Solaris. The built-in file-locking mechanism was
 
241
not scalable. Performance would degrade to the point where processes would
 
242
get into loops of trying to lock a file. It would try a lock, then fail,
 
243
then try again. The lock attempt was failing before the grant was
 
244
occurring. The visible manifestation of this was a handful of
 
245
processes stealing all of the CPU, and when they were trussed, they would
 
246
be stuck in F_SETLKW64 loops.
 
247
</para>
 
248
 
 
249
<para>
 
250
Please check with Sun support for current patches needed to fix this bug.
 
251
The patch revision for 2.6 is 105181-34, for 8 is 108528-19, and for 9 is 112233-04.
 
252
After the installation of these patches, it is recommended to reconfigure
 
253
and rebuild Samba.
 
254
</para>
 
255
 
 
256
<para>Thanks to Joe Meslovich for reporting this.</para>
 
257
 
 
258
</sect2>
 
259
 
 
260
<sect2 id="winbind-solaris9">
 
261
<title>Winbind on Solaris 9</title>
 
262
<para>
 
263
Nsswitch on Solaris 9 refuses to use the Winbind NSS module. This behavior
 
264
is fixed by Sun in patch <ulink
 
265
url="http://sunsolve.sun.com/search/advsearch.do?collection=PATCH&amp;type=collections&amp;max=50&amp;language=en&amp;queryKey5=112960;rev=14&amp;toDocument=yes">112960-14</ulink>.
 
266
</para>
 
267
</sect2>
 
268
</sect1>
 
269
 
 
270
</chapter>