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