Add some more common errors
[sfrench/samba-autobuild/.git] / docs / docbook / faq / install.xml
1 <chapter id="FAQ-Install">
2 <title>Compiling and installing Samba on a Unix host</title>
3
4 <sect1>
5 <title>I can't see the Samba server in any browse lists!</title>
6 <para>
7 See Browsing.html in the docs directory of the samba source
8 for more information on browsing.
9 </para>
10
11 <para>
12 If your GUI client does not permit you to select non-browsable
13 servers, you may need to do so on the command line. For example, under
14 Lan Manager you might connect to the above service as disk drive M:
15 thusly:
16 <programlisting>
17    net use M: \\mary\fred
18 </programlisting>
19 The details of how to do this and the specific syntax varies from
20 client to client - check your client's documentation.
21 </para>
22 </sect1>
23
24 <sect1>
25 <title>Some files that I KNOW are on the server don't show up when I view the files from my client!</title>
26 <para>See the next question.</para>
27 </sect1>
28
29 <sect1>
30 <title>Some files on the server show up with really wierd filenames when I view the files from my client!</title>
31 <para>
32 If you check what files are not showing up, you will note that they
33 are files which contain upper case letters or which are otherwise not
34 DOS-compatible (ie, they are not legal DOS filenames for some reason).
35 </para>
36
37 <para>
38 The Samba server can be configured either to ignore such files
39 completely, or to present them to the client in "mangled" form. If you
40 are not seeing the files at all, the Samba server has most likely been
41 configured to ignore them.  Consult the man page smb.conf(5) for
42 details of how to change this - the parameter you need to set is
43 "mangled names = yes".
44 </para>
45 </sect1>
46
47 <sect1>
48 <title>My client reports "cannot locate specified computer" or similar</title>
49 <para>
50 This indicates one of three things: You supplied an incorrect server
51 name, the underlying TCP/IP layer is not working correctly, or the
52 name you specified cannot be resolved.
53 </para>
54
55 <para>
56 After carefully checking that the name you typed is the name you
57 should have typed, try doing things like pinging a host or telnetting
58 to somewhere on your network to see if TCP/IP is functioning OK. If it
59 is, the problem is most likely name resolution.
60 </para>
61
62 <para>
63 If your client has a facility to do so, hardcode a mapping between the
64 hosts IP and the name you want to use. For example, with Lan Manager
65 or Windows for Workgroups you would put a suitable entry in the file
66 LMHOSTS. If this works, the problem is in the communication between
67 your client and the netbios name server. If it does not work, then
68 there is something fundamental wrong with your naming and the solution
69 is beyond the scope of this document.
70 </para>
71
72 <para>
73 If you do not have any server on your subnet supplying netbios name
74 resolution, hardcoded mappings are your only option. If you DO have a
75 netbios name server running (such as the Samba suite's nmbd program),
76 the problem probably lies in the way it is set up. Refer to Section
77 Two of this FAQ for more ideas.
78 </para>
79
80 <para>
81 By the way, remember to REMOVE the hardcoded mapping before further
82 tests :-)
83 </para>
84
85 </sect1>
86
87 <sect1>
88 <title>My client reports "cannot locate specified share name" or similar</title>
89 <para>
90 This message indicates that your client CAN locate the specified
91 server, which is a good start, but that it cannot find a service of
92 the name you gave.
93 </para>
94
95 <para>
96 The first step is to check the exact name of the service you are
97 trying to connect to (consult your system administrator). Assuming it
98 exists and you specified it correctly (read your client's docs on how
99 to specify a service name correctly), read on:
100 </para>
101
102 <simplelist>
103 <member>Many clients cannot accept or use service names longer than eight characters.</member>
104 <member>Many clients cannot accept or use service names containing spaces.</member>
105 <member>Some servers (not Samba though) are case sensitive with service names.</member>
106 <member>Some clients force service names into upper case.</member>
107 </simplelist>
108 </sect1>
109
110 <sect1>
111 <title>Printing doesn't work</title>
112 <para>
113 Make sure that the specified print command for the service you are
114 connecting to is correct and that it has a fully-qualified path (eg.,
115 use "/usr/bin/lpr" rather than just "lpr").
116 </para>
117
118 <para>
119 Make sure that the spool directory specified for the service is
120 writable by the user connected to the service. In particular the user
121 "nobody" often has problems with printing, even if it worked with an
122 earlier version of Samba. Try creating another guest user other than
123 "nobody".
124 </para>
125
126 <para>
127 Make sure that the user specified in the service is permitted to use
128 the printer.
129 </para>
130
131 <para>
132 Check the debug log produced by smbd. Search for the printer name and
133 see if the log turns up any clues. Note that error messages to do with
134 a service ipc$ are meaningless - they relate to the way the client
135 attempts to retrieve status information when using the LANMAN1
136 protocol.
137 </para>
138
139 <para>
140 If using WfWg then you need to set the default protocol to TCP/IP, not
141 Netbeui. This is a WfWg bug.
142 </para>
143
144 <para>
145 If using the Lanman1 protocol (the default) then try switching to
146 coreplus.  Also not that print status error messages don't mean
147 printing won't work. The print status is received by a different
148 mechanism.
149 </para>
150 </sect1>
151
152 <sect1>
153 <title>My client reports "This server is not configured to list shared resources"</title>
154 <para>
155 Your guest account is probably invalid for some reason. Samba uses the
156 guest account for browsing in smbd.  Check that your guest account is
157 valid.
158 </para>
159
160 <para>See also 'guest account' in smb.conf man page.</para>
161
162 </sect1>
163
164 <sect1>
165 <title>Log message "you appear to have a trapdoor uid system" </title>
166 <para>
167 This can have several causes. It might be because you are using a uid
168 or gid of 65535 or -1. This is a VERY bad idea, and is a big security
169 hole. Check carefully in your /etc/passwd file and make sure that no
170 user has uid 65535 or -1. Especially check the "nobody" user, as many
171 broken systems are shipped with nobody setup with a uid of 65535.
172 </para>
173
174 <para>It might also mean that your OS has a trapdoor uid/gid system :-)</para>
175
176 <para>
177 This means that once a process changes effective uid from root to
178 another user it can't go back to root. Unfortunately Samba relies on
179 being able to change effective uid from root to non-root and back
180 again to implement its security policy. If your OS has a trapdoor uid
181 system this won't work, and several things in Samba may break. Less
182 things will break if you use user or server level security instead of
183 the default share level security, but you may still strike
184 problems.
185 </para>
186
187 <para>
188 The problems don't give rise to any security holes, so don't panic,
189 but it does mean some of Samba's capabilities will be unavailable.
190 In particular you will not be able to connect to the Samba server as
191 two different uids at once. This may happen if you try to print as a
192 "guest" while accessing a share as a normal user. It may also affect
193 your ability to list the available shares as this is normally done as
194 the guest user.
195 </para>
196
197 <para>
198 Complain to your OS vendor and ask them to fix their system.
199 </para>
200
201 <para>
202 Note: the reason why 65535 is a VERY bad choice of uid and gid is that
203 it casts to -1 as a uid, and the setreuid() system call ignores (with
204 no error) uid changes to -1. This means any daemon attempting to run
205 as uid 65535 will actually run as root. This is not good!
206 </para>
207
208 </sect1>
209
210 <sect1>
211 <title>Why are my file's timestamps off by an hour, or by a few hours?</title>
212 <para>
213 This is from Paul Eggert eggert@twinsun.com.
214 </para>
215
216 <para>
217 Most likely it's a problem with your time zone settings.
218 </para>
219
220 <para>
221 Internally, Samba maintains time in traditional Unix format,
222 namely, the number of seconds since 1970-01-01 00:00:00 Universal Time
223 (or ``GMT''), not counting leap seconds.
224 </para>
225
226 <para>
227 On the server side, Samba uses the Unix TZ variable to convert
228 internal timestamps to and from local time.  So on the server side, there are
229 two things to get right.
230 <simplelist>
231 <member>The Unix system clock must have the correct Universal time. Use the shell command "sh -c 'TZ=UTC0 date'" to check this.</member>
232 <member>The TZ environment variable must be set on the server before Samba is invoked.  The details of this depend on the server OS, but typically you must edit a file whose name is /etc/TIMEZONE or /etc/default/init, or run the command `zic -l'.</member>
233 </simplelist>
234 </para>
235
236 <para>TZ must have the correct value.</para>
237
238 <para>
239 If possible, use geographical time zone settings
240 (e.g. TZ='America/Los_Angeles' or perhaps
241  TZ=':US/Pacific').  These are supported by most
242 popular Unix OSes, are easier to get right, and are
243 more accurate for historical timestamps.  If your
244 operating system has out-of-date tables, you should be
245 able to update them from the public domain time zone
246 tables at <ulink url="ftp://elsie.nci.nih.gov/pub/">ftp://elsie.nci.nih.gov/pub/</ulink>.
247 </para>
248
249 <para>If your system does not support geographical timezone
250 settings, you must use a Posix-style TZ strings, e.g.
251 TZ='PST8PDT,M4.1.0/2,M10.5.0/2' for US Pacific time.
252 Posix TZ strings can take the following form (with optional
253                                                                                           items in brackets):
254 <programlisting>
255         StdOffset[Dst[Offset],Date/Time,Date/Time]
256 </programlisting>
257                 where:
258 </para>
259
260 <para><simplelist>
261 <member>`Std' is the standard time designation (e.g. `PST').</member>
262 <member>`Offset' is the number of hours behind UTC (e.g. `8').
263 Prepend a `-' if you are ahead of UTC, and
264 append `:30' if you are at a half-hour offset.
265 Omit all the remaining items if you do not use
266 daylight-saving time.</member>
267
268 <member>`Dst' is the daylight-saving time designation
269 (e.g. `PDT').</member>
270
271 <member>The optional second `Offset' is the number of
272 hours that daylight-saving time is behind UTC.
273 The default is 1 hour ahead of standard time.
274 </member>
275
276 <member>`Date/Time,Date/Time' specify when daylight-saving
277 time starts and ends.  The format for a date is
278 `Mm.n.d', which specifies the dth day (0 is Sunday)
279 of the nth week of the mth month, where week 5 means
280 the last such day in the month.  The format for a
281 time is [h]h[:mm[:ss]], using a 24-hour clock.
282 </member>
283
284 </simplelist>
285 </para>
286
287 <para>
288 Other Posix string formats are allowed but you don't want
289 to know about them.</para>
290
291 <para>
292 On the client side, you must make sure that your client's clock and
293 time zone is also set appropriately.  [[I don't know how to do this.]]
294 Samba traditionally has had many problems dealing with time zones, due
295 to the bizarre ways that Microsoft network protocols handle time
296 zones.  
297 </para>
298 </sect1>
299
300 <sect1>
301 <title>How do I set the printer driver name correctly?</title>
302 <para>Question:
303 <quote> On NT, I opened "Printer Manager" and "Connect to Printer".
304  Enter ["\\ptdi270\ps1"] in the box of printer. I got the
305  following error message
306  </quote></para>
307  <para>
308  <programlisting>
309      You do not have sufficient access to your machine
310      to connect to the selected printer, since a driver
311      needs to be installed locally.
312  </programlisting>
313  </para>
314
315  <para>Answer:</para>
316
317  <para>In the more recent versions of Samba you can now set the "printer
318 driver" in smb.conf. This tells the client what driver to use. For
319 example:</para>
320 <para><programlisting>
321      printer driver = HP LaserJet 4L
322 </programlisting></para>
323 <para>With this, NT knows to use the right driver. You have to get this string
324 exactly right.</para>
325
326 <para>To find the exact string to use, you need to get to the dialog box in
327 your client where you select which printer driver to install. The
328 correct strings for all the different printers are shown in a listbox
329 in that dialog box.</para>
330
331 </sect1>
332
333 </chapter>