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">
7
<!-- Some other people as well, but there were no author names in the text files this file is based on-->
10
<title>Portability</title>
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>
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>
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
44
This is documented in the HP manual pages under setgroups(2) and passwd(4).
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.
57
<title>SCO UNIX</title>
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.
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).
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.
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.
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.
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>:
104
<para><programlisting>
117
</programlisting></para>
120
Put this in the file <filename>seteuid.s</filename>:
123
<para><programlisting>
136
</programlisting></para>
139
After creating the files, you then assemble them using
143
&prompt;<userinput>as seteuid.s</userinput>
144
&prompt;<userinput>as setegid.s</userinput>
148
which should produce the files <filename>seteuid.o</filename> and
149
<filename>setegid.o</filename>.
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:
157
<para><programlisting>
158
LIBSM = setegid.o seteuid.o -ln
159
</programlisting></para>
162
You should then remove the line:
165
<para><programlisting>
167
</programlisting></para>
169
<para>from the DNIX section of <filename>includes.h</filename>.</para>
174
<title>Red Hat Linux</title>
177
By default during installation, some versions of Red Hat Linux add an
178
entry to <filename>/etc/hosts</filename> as follows:
180
127.0.0.1 loopback "hostname"."domainname"
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.
193
Corrective action: Delete the entry after the word "loopback"
194
in the line starting 127.0.0.1.
199
<title>AIX: Sequential Read Ahead</title>
200
<!-- From an email by William Jojo <jojowil@hvcc.edu> -->
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.
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:
216
For AIX 5.1 and earlier: <userinput>vmtune -r 0</userinput>
220
For AIX 5.2 and later jfs filesystems: <userinput>ioo -o minpgahead=0</userinput>
224
For AIX 5.2 and later jfs2 filesystems: <userinput>ioo -o j2_minPageReadAhead=0</userinput>
228
If you have a mix of jfs and jfs2 filesystems on the same host, simply use both
234
<title>Solaris</title>
237
<title>Locking Improvements</title>
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.
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
256
<para>Thanks to Joe Meslovich for reporting this.</para>
260
<sect2 id="winbind-solaris9">
261
<title>Winbind on Solaris 9</title>
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&type=collections&max=50&language=en&queryKey5=112960;rev=14&toDocument=yes">112960-14</ulink>.