Some update and Fixes for typos.
[kai/samba.git] / docs / faq / install.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Compiling and installing Samba on a Unix host</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "><LINK
10 REL="HOME"
11 TITLE="Samba FAQ"
12 HREF="samba-faq.html"><LINK
13 REL="PREVIOUS"
14 TITLE="General Information"
15 HREF="general.html"><LINK
16 REL="NEXT"
17 TITLE="Configuration problems"
18 HREF="config.html"></HEAD
19 ><BODY
20 CLASS="CHAPTER"
21 BGCOLOR="#FFFFFF"
22 TEXT="#000000"
23 LINK="#0000FF"
24 VLINK="#840084"
25 ALINK="#0000FF"
26 ><DIV
27 CLASS="NAVHEADER"
28 ><TABLE
29 SUMMARY="Header navigation table"
30 WIDTH="100%"
31 BORDER="0"
32 CELLPADDING="0"
33 CELLSPACING="0"
34 ><TR
35 ><TH
36 COLSPAN="3"
37 ALIGN="center"
38 >Samba FAQ</TH
39 ></TR
40 ><TR
41 ><TD
42 WIDTH="10%"
43 ALIGN="left"
44 VALIGN="bottom"
45 ><A
46 HREF="general.html"
47 ACCESSKEY="P"
48 >Prev</A
49 ></TD
50 ><TD
51 WIDTH="80%"
52 ALIGN="center"
53 VALIGN="bottom"
54 ></TD
55 ><TD
56 WIDTH="10%"
57 ALIGN="right"
58 VALIGN="bottom"
59 ><A
60 HREF="config.html"
61 ACCESSKEY="N"
62 >Next</A
63 ></TD
64 ></TR
65 ></TABLE
66 ><HR
67 ALIGN="LEFT"
68 WIDTH="100%"></DIV
69 ><DIV
70 CLASS="CHAPTER"
71 ><H1
72 ><A
73 NAME="INSTALL">Chapter 2. Compiling and installing Samba on a Unix host</H1
74 ><DIV
75 CLASS="SECT1"
76 ><H1
77 CLASS="SECT1"
78 ><A
79 NAME="AEN84">2.1. I can't see the Samba server in any browse lists!</H1
80 ><P
81 >See Browsing.html in the docs directory of the samba source
82 for more information on browsing.</P
83 ><P
84 >If your GUI client does not permit you to select non-browsable
85 servers, you may need to do so on the command line. For example, under
86 Lan Manager you might connect to the above service as disk drive M:
87 thusly:
88 <PRE
89 CLASS="PROGRAMLISTING"
90 >   net use M: \\mary\fred</PRE
91 >
92 The details of how to do this and the specific syntax varies from
93 client to client - check your client's documentation.</P
94 ></DIV
95 ><DIV
96 CLASS="SECT1"
97 ><H1
98 CLASS="SECT1"
99 ><A
100 NAME="AEN89">2.2. Some files that I KNOW are on the server doesn't show up when I view the files from my client!</H1
101 ><P
102 >See the next question.</P
103 ></DIV
104 ><DIV
105 CLASS="SECT1"
106 ><H1
107 CLASS="SECT1"
108 ><A
109 NAME="AEN92">2.3. Some files on the server show up with really wierd filenames when I view the files from my client!</H1
110 ><P
111 >If you check what files are not showing up, you will note that they
112 are files which contain upper case letters or which are otherwise not
113 DOS-compatible (ie, they are not legal DOS filenames for some reason).</P
114 ><P
115 >The Samba server can be configured either to ignore such files
116 completely, or to present them to the client in "mangled" form. If you
117 are not seeing the files at all, the Samba server has most likely been
118 configured to ignore them.  Consult the man page smb.conf(5) for
119 details of how to change this - the parameter you need to set is
120 "mangled names = yes".</P
121 ></DIV
122 ><DIV
123 CLASS="SECT1"
124 ><H1
125 CLASS="SECT1"
126 ><A
127 NAME="AEN96">2.4. My client reports "cannot locate specified computer" or similar</H1
128 ><P
129 >This indicates one of three things: You supplied an incorrect server
130 name, the underlying TCP/IP layer is not working correctly, or the
131 name you specified cannot be resolved.</P
132 ><P
133 >After carefully checking that the name you typed is the name you
134 should have typed, try doing things like pinging a host or telnetting
135 to somewhere on your network to see if TCP/IP is functioning OK. If it
136 is, the problem is most likely name resolution.</P
137 ><P
138 >If your client has a facility to do so, hardcode a mapping between the
139 hosts IP and the name you want to use. For example, with Lan Manager
140 or Windows for Workgroups you would put a suitable entry in the file
141 LMHOSTS. If this works, the problem is in the communication between
142 your client and the netbios name server. If it does not work, then
143 there is something fundamental wrong with your naming and the solution
144 is beyond the scope of this document.</P
145 ><P
146 >If you do not have any server on your subnet supplying netbios name
147 resolution, hardcoded mappings are your only option. If you DO have a
148 netbios name server running (such as the Samba suite's nmbd program),
149 the problem probably lies in the way it is set up. Refer to Section
150 Two of this FAQ for more ideas.</P
151 ><P
152 >By the way, remember to REMOVE the hardcoded mapping before further
153 tests :-)</P
154 ></DIV
155 ><DIV
156 CLASS="SECT1"
157 ><H1
158 CLASS="SECT1"
159 ><A
160 NAME="AEN103">2.5. My client reports "cannot locate specified share name" or similar</H1
161 ><P
162 >This message indicates that your client CAN locate the specified
163 server, which is a good start, but that it cannot find a service of
164 the name you gave.</P
165 ><P
166 >The first step is to check the exact name of the service you are
167 trying to connect to (consult your system administrator). Assuming it
168 exists and you specified it correctly (read your client's docs on how
169 to specify a service name correctly), read on:</P
170 ><P
171 ></P
172 ><TABLE
173 BORDER="0"
174 ><TBODY
175 ><TR
176 ><TD
177 >Many clients cannot accept or use service names longer than eight characters.</TD
178 ></TR
179 ><TR
180 ><TD
181 >Many clients cannot accept or use service names containing spaces.</TD
182 ></TR
183 ><TR
184 ><TD
185 >Some servers (not Samba though) are case sensitive with service names.</TD
186 ></TR
187 ><TR
188 ><TD
189 >Some clients force service names into upper case.</TD
190 ></TR
191 ></TBODY
192 ></TABLE
193 ><P
194 ></P
195 ></DIV
196 ><DIV
197 CLASS="SECT1"
198 ><H1
199 CLASS="SECT1"
200 ><A
201 NAME="AEN112">2.6. Printing doesn't work</H1
202 ><P
203 >Make sure that the specified print command for the service you are
204 connecting to is correct and that it has a fully-qualified path (eg.,
205 use "/usr/bin/lpr" rather than just "lpr").</P
206 ><P
207 >Make sure that the spool directory specified for the service is
208 writable by the user connected to the service. In particular the user
209 "nobody" often has problems with printing, even if it worked with an
210 earlier version of Samba. Try creating another guest user other than
211 "nobody".</P
212 ><P
213 >Make sure that the user specified in the service is permitted to use
214 the printer.</P
215 ><P
216 >Check the debug log produced by smbd. Search for the printer name and
217 see if the log turns up any clues. Note that error messages to do with
218 a service ipc$ are meaningless - they relate to the way the client
219 attempts to retrieve status information when using the LANMAN1
220 protocol.</P
221 ><P
222 >If using WfWg then you need to set the default protocol to TCP/IP, not
223 Netbeui. This is a WfWg bug.</P
224 ><P
225 >If using the Lanman1 protocol (the default) then try switching to
226 coreplus.  Also not that print status error messages don't mean
227 printing won't work. The print status is received by a different
228 mechanism.</P
229 ></DIV
230 ><DIV
231 CLASS="SECT1"
232 ><H1
233 CLASS="SECT1"
234 ><A
235 NAME="AEN120">2.7. My client reports "This server is not configured to list shared resources"</H1
236 ><P
237 >Your guest account is probably invalid for some reason. Samba uses the
238 guest account for browsing in smbd.  Check that your guest account is
239 valid.</P
240 ><P
241 >See also 'guest account' in smb.conf man page.</P
242 ></DIV
243 ><DIV
244 CLASS="SECT1"
245 ><H1
246 CLASS="SECT1"
247 ><A
248 NAME="AEN124">2.8. Log message "you appear to have a trapdoor uid system"</H1
249 ><P
250 >This can have several causes. It might be because you are using a uid
251 or gid of 65535 or -1. This is a VERY bad idea, and is a big security
252 hole. Check carefully in your /etc/passwd file and make sure that no
253 user has uid 65535 or -1. Especially check the "nobody" user, as many
254 broken systems are shipped with nobody setup with a uid of 65535.</P
255 ><P
256 >It might also mean that your OS has a trapdoor uid/gid system :-)</P
257 ><P
258 >This means that once a process changes effective uid from root to
259 another user it can't go back to root. Unfortunately Samba relies on
260 being able to change effective uid from root to non-root and back
261 again to implement its security policy. If your OS has a trapdoor uid
262 system this won't work, and several things in Samba may break. Less
263 things will break if you use user or server level security instead of
264 the default share level security, but you may still strike
265 problems.</P
266 ><P
267 >The problems don't give rise to any security holes, so don't panic,
268 but it does mean some of Samba's capabilities will be unavailable.
269 In particular you will not be able to connect to the Samba server as
270 two different uids at once. This may happen if you try to print as a
271 "guest" while accessing a share as a normal user. It may also affect
272 your ability to list the available shares as this is normally done as
273 the guest user.</P
274 ><P
275 >Complain to your OS vendor and ask them to fix their system.</P
276 ><P
277 >Note: the reason why 65535 is a VERY bad choice of uid and gid is that
278 it casts to -1 as a uid, and the setreuid() system call ignores (with
279 no error) uid changes to -1. This means any daemon attempting to run
280 as uid 65535 will actually run as root. This is not good!</P
281 ></DIV
282 ><DIV
283 CLASS="SECT1"
284 ><H1
285 CLASS="SECT1"
286 ><A
287 NAME="AEN132">2.9. Why are my file's timestamps off by an hour, or by a few hours?</H1
288 ><P
289 >This is from Paul Eggert eggert@twinsun.com.</P
290 ><P
291 >Most likely it's a problem with your time zone settings.</P
292 ><P
293 >Internally, Samba maintains time in traditional Unix format,
294 namely, the number of seconds since 1970-01-01 00:00:00 Universal Time
295 (or ``GMT''), not counting leap seconds.</P
296 ><P
297 >On the server side, Samba uses the Unix TZ variable to convert
298 internal timestamps to and from local time.  So on the server side, there are
299 two things to get right.
300 <P
301 ></P
302 ><TABLE
303 BORDER="0"
304 ><TBODY
305 ><TR
306 ><TD
307 >The Unix system clock must have the correct Universal time. Use the shell command "sh -c 'TZ=UTC0 date'" to check this.</TD
308 ></TR
309 ><TR
310 ><TD
311 >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'.</TD
312 ></TR
313 ></TBODY
314 ></TABLE
315 ><P
316 ></P
317 ></P
318 ><P
319 >TZ must have the correct value.</P
320 ><P
321 >If possible, use geographical time zone settings
322 (e.g. TZ='America/Los_Angeles' or perhaps
323  TZ=':US/Pacific').  These are supported by most
324 popular Unix OSes, are easier to get right, and are
325 more accurate for historical timestamps.  If your
326 operating system has out-of-date tables, you should be
327 able to update them from the public domain time zone
328 tables at <A
329 HREF="ftp://elsie.nci.nih.gov/pub/"
330 TARGET="_top"
331 >ftp://elsie.nci.nih.gov/pub/</A
332 >.</P
333 ><P
334 >If your system does not support geographical timezone
335 settings, you must use a Posix-style TZ strings, e.g.
336 TZ='PST8PDT,M4.1.0/2,M10.5.0/2' for US Pacific time.
337 Posix TZ strings can take the following form (with optional
338                                                                                           items in brackets):
339 <PRE
340 CLASS="PROGRAMLISTING"
341 >       StdOffset[Dst[Offset],Date/Time,Date/Time]</PRE
342 >
343                 where:</P
344 ><P
345 ><P
346 ></P
347 ><TABLE
348 BORDER="0"
349 ><TBODY
350 ><TR
351 ><TD
352 >`Std' is the standard time designation (e.g. `PST').</TD
353 ></TR
354 ><TR
355 ><TD
356 >`Offset' is the number of hours behind UTC (e.g. `8').
357 Prepend a `-' if you are ahead of UTC, and
358 append `:30' if you are at a half-hour offset.
359 Omit all the remaining items if you do not use
360 daylight-saving time.</TD
361 ></TR
362 ><TR
363 ><TD
364 >`Dst' is the daylight-saving time designation
365 (e.g. `PDT').</TD
366 ></TR
367 ><TR
368 ><TD
369 >The optional second `Offset' is the number of
370 hours that daylight-saving time is behind UTC.
371 The default is 1 hour ahead of standard time.</TD
372 ></TR
373 ><TR
374 ><TD
375 >`Date/Time,Date/Time' specify when daylight-saving
376 time starts and ends.  The format for a date is
377 `Mm.n.d', which specifies the dth day (0 is Sunday)
378 of the nth week of the mth month, where week 5 means
379 the last such day in the month.  The format for a
380 time is [h]h[:mm[:ss]], using a 24-hour clock.</TD
381 ></TR
382 ></TBODY
383 ></TABLE
384 ><P
385 ></P
386 ></P
387 ><P
388 >Other Posix string formats are allowed but you don't want
389 to know about them.</P
390 ><P
391 >On the client side, you must make sure that your client's clock and
392 time zone is also set appropriately.  [[I don't know how to do this.]]
393 Samba traditionally has had many problems dealing with time zones, due
394 to the bizarre ways that Microsoft network protocols handle time
395 zones.  </P
396 ></DIV
397 ><DIV
398 CLASS="SECT1"
399 ><H1
400 CLASS="SECT1"
401 ><A
402 NAME="AEN155">2.10. How do I set the printer driver name correctly?</H1
403 ><P
404 >Question:
405 <SPAN
406 CLASS="QUOTE"
407 >" On NT, I opened "Printer Manager" and "Connect to Printer".
408  Enter ["\\ptdi270\ps1"] in the box of printer. I got the
409  following error message
410  "</SPAN
411 ></P
412 ><P
413 > <PRE
414 CLASS="PROGRAMLISTING"
415 >     You do not have sufficient access to your machine
416      to connect to the selected printer, since a driver
417      needs to be installed locally.
418  </PRE
419 >
420  </P
421 ><P
422 >Answer:</P
423 ><P
424 >In the more recent versions of Samba you can now set the "printer
425 driver" in smb.conf. This tells the client what driver to use. For
426 example:</P
427 ><P
428 ><PRE
429 CLASS="PROGRAMLISTING"
430 >     printer driver = HP LaserJet 4L</PRE
431 ></P
432 ><P
433 >With this, NT knows to use the right driver. You have to get this string
434 exactly right.</P
435 ><P
436 >To find the exact string to use, you need to get to the dialog box in
437 your client where you select which printer driver to install. The
438 correct strings for all the different printers are shown in a listbox
439 in that dialog box.</P
440 ></DIV
441 ></DIV
442 ><DIV
443 CLASS="NAVFOOTER"
444 ><HR
445 ALIGN="LEFT"
446 WIDTH="100%"><TABLE
447 SUMMARY="Footer navigation table"
448 WIDTH="100%"
449 BORDER="0"
450 CELLPADDING="0"
451 CELLSPACING="0"
452 ><TR
453 ><TD
454 WIDTH="33%"
455 ALIGN="left"
456 VALIGN="top"
457 ><A
458 HREF="general.html"
459 ACCESSKEY="P"
460 >Prev</A
461 ></TD
462 ><TD
463 WIDTH="34%"
464 ALIGN="center"
465 VALIGN="top"
466 ><A
467 HREF="samba-faq.html"
468 ACCESSKEY="H"
469 >Home</A
470 ></TD
471 ><TD
472 WIDTH="33%"
473 ALIGN="right"
474 VALIGN="top"
475 ><A
476 HREF="config.html"
477 ACCESSKEY="N"
478 >Next</A
479 ></TD
480 ></TR
481 ><TR
482 ><TD
483 WIDTH="33%"
484 ALIGN="left"
485 VALIGN="top"
486 >General Information</TD
487 ><TD
488 WIDTH="34%"
489 ALIGN="center"
490 VALIGN="top"
491 >&nbsp;</TD
492 ><TD
493 WIDTH="33%"
494 ALIGN="right"
495 VALIGN="top"
496 >Configuration problems</TD
497 ></TR
498 ></TABLE
499 ></DIV
500 ></BODY
501 ></HTML
502 >