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