small fixes
[tprouty/samba.git] / docs / faq / faq-features.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Features</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="Common errors"
14 HREF="faq-errors.html"><LINK
15 REL="NEXT"
16 TITLE="Printing problems"
17 HREF="faq-printing.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-errors.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-printing.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-FEATURES"
73 ></A
74 >Chapter 6. Features</H1
75 ><DIV
76 CLASS="TOC"
77 ><DL
78 ><DT
79 ><B
80 >Table of Contents</B
81 ></DT
82 ><DT
83 >6.1. <A
84 HREF="faq-features.html#AEN257"
85 >How can I prevent my samba server from being used to distribute the Nimda worm?</A
86 ></DT
87 ><DT
88 >6.2. <A
89 HREF="faq-features.html#AEN271"
90 >How can I use samba as a fax server?</A
91 ></DT
92 ><DD
93 ><DL
94 ><DT
95 >6.2.1. <A
96 HREF="faq-features.html#AEN282"
97 >Tools for printing faxes</A
98 ></DT
99 ><DT
100 >6.2.2. <A
101 HREF="faq-features.html#AEN291"
102 >Making the fax-server</A
103 ></DT
104 ><DT
105 >6.2.3. <A
106 HREF="faq-features.html#AEN307"
107 >Installing the client drivers</A
108 ></DT
109 ><DT
110 >6.2.4. <A
111 HREF="faq-features.html#AEN321"
112 >Example smb.conf</A
113 ></DT
114 ></DL
115 ></DD
116 ><DT
117 >6.3. <A
118 HREF="faq-features.html#AEN325"
119 >Samba doesn't work well together with DHCP!</A
120 ></DT
121 ><DT
122 >6.4. <A
123 HREF="faq-features.html#AEN338"
124 >How can I assign NetBIOS names to clients with DHCP?</A
125 ></DT
126 ><DT
127 >6.5. <A
128 HREF="faq-features.html#AEN345"
129 >How do I convert between unix and dos text formats?</A
130 ></DT
131 ><DT
132 >6.6. <A
133 HREF="faq-features.html#AEN350"
134 >Does samba have wins replication support?</A
135 ></DT
136 ></DL
137 ></DIV
138 ><DIV
139 CLASS="SECT1"
140 ><H1
141 CLASS="SECT1"
142 ><A
143 NAME="AEN257"
144 >6.1. How can I prevent my samba server from being used to distribute the Nimda worm?</A
145 ></H1
146 ><P
147 >Author: HASEGAWA Yosuke (translated by <A
148 HREF="monyo@samba.gr.jp"
149 TARGET="_top"
150 >TAKAHASHI Motonobu</A
151 >)</P
152 ><P
153 >Nimba Worm is infected through shared disks on a network, as well as through
154 Microsoft IIS, Internet Explorer and mailer of Outlook series.</P
155 ><P
156 >At this time, the worm copies itself by the name *.nws and *.eml on
157 the shared disk, moreover, by the name of Riched20.dll in the folder
158 where *.doc file is included.</P
159 ><P
160 >To prevent infection through the shared disk offered by Samba, set
161 up as follows:</P
162 ><P
163 ><PRE
164 CLASS="PROGRAMLISTING"
165 >[global]
166   ...
167   # This can break Administration installations of Office2k.
168   # in that case, don't veto the riched20.dll
169   veto files = /*.eml/*.nws/riched20.dll/</PRE
170 ></P
171 ><P
172 >By setting the "veto files" parameter, matched files on the Samba
173 server are completely hidden from the clients and making it impossible
174 to access them at all.</P
175 ><P
176 >In addition to it, the following setting is also pointed out by the
177 samba-jp:09448 thread: when the
178 "readme.txt.{3050F4D8-98B5-11CF-BB82-00AA00BDCE0B}" file exists on
179 a Samba server, it is visible only as "readme.txt" and dangerous
180 code may be executed if this file is double-clicked.</P
181 ><P
182 >Setting the following,
183 <PRE
184 CLASS="PROGRAMLISTING"
185 >  veto files = /*.{*}/</PRE
186 >
187 any files having CLSID in its file extension will be inaccessible from any
188 clients.</P
189 ><P
190 >This technical article is created based on the discussion of
191 samba-jp:09448 and samba-jp:10900 threads.</P
192 ></DIV
193 ><DIV
194 CLASS="SECT1"
195 ><H1
196 CLASS="SECT1"
197 ><A
198 NAME="AEN271"
199 >6.2. How can I use samba as a fax server?</A
200 ></H1
201 ><P
202 >Contributor: <A
203 HREF="mailto:zuber@berlin.snafu.de"
204 TARGET="_top"
205 >Gerhard Zuber</A
206 ></P
207 ><P
208 >Requirements:
209 <P
210 ></P
211 ><TABLE
212 BORDER="0"
213 ><TBODY
214 ><TR
215 ><TD
216 >UNIX box (Linux preferred) with SAMBA and a faxmodem</TD
217 ></TR
218 ><TR
219 ><TD
220 >ghostscript package</TD
221 ></TR
222 ><TR
223 ><TD
224 >mgetty+sendfax package</TD
225 ></TR
226 ><TR
227 ><TD
228 >pbm package (portable bitmap tools)</TD
229 ></TR
230 ></TBODY
231 ></TABLE
232 ><P
233 ></P
234 ></P
235 ><P
236 >First, install and configure the required packages. Be sure to read the mgetty+sendfax 
237 manual carefully.</P
238 ><DIV
239 CLASS="SECT2"
240 ><H2
241 CLASS="SECT2"
242 ><A
243 NAME="AEN282"
244 >6.2.1. Tools for printing faxes</A
245 ></H2
246 ><P
247 >Your incomed faxes are in:
248 <TT
249 CLASS="FILENAME"
250 >/var/spool/fax/incoming</TT
251 >. Print it with:</P
252 ><P
253 ><PRE
254 CLASS="PROGRAMLISTING"
255 >for i in *
256 do
257 g3cat $i | g3tolj | lpr -P hp
258 done</PRE
259 ></P
260 ><P
261 >g3cat is in the tools-section, g3tolj is in the contrib-section
262 for printing to HP lasers.</P
263 ><P
264 >If you want to produce files for displaying and printing with Windows, use
265 some tools from the pbm-package like the following command: <B
266 CLASS="COMMAND"
267 >g3cat $i | g3topbm - |  ppmtopcx - &#62;$i.pcx</B
268 >
269 and view it with your favourite Windows tool (maybe paintbrush)</P
270 ></DIV
271 ><DIV
272 CLASS="SECT2"
273 ><H2
274 CLASS="SECT2"
275 ><A
276 NAME="AEN291"
277 >6.2.2. Making the fax-server</A
278 ></H2
279 ><P
280 >fetch the file <TT
281 CLASS="FILENAME"
282 >mgetty+sendfax/frontends/winword/faxfilter</TT
283 > and place it in <TT
284 CLASS="FILENAME"
285 >/usr/local/etc/mgetty+sendfax/</TT
286 >(replace /usr/local/ with whatever place you installed mgetty+sendfax)</P
287 ><P
288 >prepare your faxspool file as mentioned in this file
289 edit fax/faxspool.in and reinstall or change the final
290 /usr/local/bin/faxspool too.</P
291 ><P
292 ><PRE
293 CLASS="PROGRAMLISTING"
294 >if [ "$user" = "root" -o "$user" = "fax" -o \
295      "$user" = "lp" -o "$user" = "daemon" -o "$user" = "bin" ]</PRE
296 ></P
297 ><P
298 >find the first line and change it to the second.</P
299 ><P
300 >make sure you have pbmtext (from the pbm-package). This is
301 needed for creating the small header line on each page.</P
302 ><P
303 >Prepare your faxheader <TT
304 CLASS="FILENAME"
305 >/usr/local/etc/mgetty+sendfax/faxheader</TT
306 ></P
307 ><P
308 >Edit your /etc/printcap file:
309 <PRE
310 CLASS="PROGRAMLISTING"
311 ># FAX 
312 lp3|fax:\
313         :lp=/dev/null:\
314         :sd=/usr/spool/lp3:\
315         :if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
316         :lf=/usr/spool/lp3/fax-log:</PRE
317 ></P
318 ><P
319 >Now, edit your <TT
320 CLASS="FILENAME"
321 >smb.conf</TT
322 > so you have a smb based printer named "fax"</P
323 ></DIV
324 ><DIV
325 CLASS="SECT2"
326 ><H2
327 CLASS="SECT2"
328 ><A
329 NAME="AEN307"
330 >6.2.3. Installing the client drivers</A
331 ></H2
332 ><P
333 >Now you have a printer called "fax" which can be used via
334 TCP/IP-printing (lpd-system) or via SAMBA (windows printing).</P
335 ><P
336 >On every system you are able to produce postscript-files you
337 are ready to fax.</P
338 ><P
339 >On Windows 3.1 95 and NT:</P
340 ><P
341 >Install a printer wich produces postscript output,
342    e.g.  apple laserwriter</P
343 ><P
344 >Connect the "fax" to your printer.</P
345 ><P
346 >Now write your first fax. Use your favourite wordprocessor,
347 write, winword, notepad or whatever you want, and start
348 with the headerpage.</P
349 ><P
350 >Usually each fax has a header page. It carries your name,
351 your address, your phone/fax-number.</P
352 ><P
353 >It carries also the recipient, his address and his *** fax
354 number ***. Now here is the trick:</P
355 ><P
356 >Use the text:
357 <PRE
358 CLASS="PROGRAMLISTING"
359 >Fax-Nr: 123456789</PRE
360 >
361 as the recipients fax-number. Make sure this text does not
362 occur in regular text ! Make sure this text is not broken
363 by formatting information, e.g. format it as a single entity.
364 (Windows Write and Win95 Wordpad are functional, maybe newer
365  versions of Winword are breaking formatting information).</P
366 ><P
367 >The trick is that postscript output is human readable and
368 the faxfilter program scans the text for this pattern and
369 uses the found number as the fax-destination-number.</P
370 ><P
371 >Now print your fax through the fax-printer and it will be
372 queued for later transmission. Use faxrunq for sending the
373 queue out.</P
374 ></DIV
375 ><DIV
376 CLASS="SECT2"
377 ><H2
378 CLASS="SECT2"
379 ><A
380 NAME="AEN321"
381 >6.2.4. Example smb.conf</A
382 ></H2
383 ><P
384 ><PRE
385 CLASS="PROGRAMLISTING"
386 >[global]
387  printcap name = /etc/printcap
388  print command = /usr/bin/lpr -r -P %p %s
389  lpq command = /usr/bin/lpq -P %p
390  lprm command = /usr/bin/lprm -P %p %j
391
392 [fax]
393     comment = FAX (mgetty+sendfax)
394     path = /tmp
395     printable = yes
396     public = yes
397     writable = no
398     create mode = 0700
399     browseable = yes
400     guest ok = no</PRE
401 ></P
402 ></DIV
403 ></DIV
404 ><DIV
405 CLASS="SECT1"
406 ><H1
407 CLASS="SECT1"
408 ><A
409 NAME="AEN325"
410 >6.3. Samba doesn't work well together with DHCP!</A
411 ></H1
412 ><P
413 >We wish to help those folks who wish to use the ISC DHCP Server and provide
414 sample configuration settings. Most operating systems today come ship with
415 the ISC DHCP Server. ISC DHCP is available from:
416 <A
417 HREF="ftp://ftp.isc.org/isc/dhcp"
418 TARGET="_top"
419 >ftp://ftp.isc.org/isc/dhcp</A
420 ></P
421 ><P
422 >Incorrect configuration of MS Windows clients (Windows9X, Windows ME, Windows
423 NT/2000) will lead to problems with browsing and with general network
424 operation. Windows 9X/ME users often report problems where the TCP/IP and related
425 network settings will inadvertantly become reset at machine start-up resulting
426 in loss of configuration settings. This results in increased maintenance
427 overheads as well as serious user frustration.</P
428 ><P
429 >In recent times users on one mailing list incorrectly attributed the cause of
430 network operating problems to incorrect configuration of Samba.</P
431 ><P
432 >One user insisted that the only way to provent Windows95 from periodically
433 performing a full system reset and hardware detection process on start-up was
434 to install the NetBEUI protocol in addition to TCP/IP. This assertion is not
435 correct.</P
436 ><P
437 >In the first place, there is NO need for NetBEUI. All Microsoft Windows clients
438 natively run NetBIOS over TCP/IP, and that is the only protocol that is
439 recognised by Samba. Installation of NetBEUI and/or NetBIOS over IPX will
440 cause problems with browse list operation on most networks. Even Windows NT
441 networks experience these problems when incorrectly configured Windows95
442 systems share the same name space. It is important that only those protocols
443 that are strictly needed for site specific reasons should EVER be installed.</P
444 ><P
445 >Secondly, and totally against common opinion, DHCP is NOT an evil design but is
446 an extension of the BOOTP protocol that has been in use in Unix environments
447 for many years without any of the melt-down problems that some sensationalists
448 would have us believe can be experienced with DHCP. In fact, DHCP in covered by
449 rfc1541 and is a very safe method of keeping an MS Windows desktop environment
450 under control and for ensuring stable network operation.</P
451 ><P
452 >Please note that MS Windows systems as of MS Windows NT 3.1 and MS Windows 95
453 store all network configuration settings a registry. There are a few reports
454 from MS Windows network administrators that warrant mention here. It would appear
455 that when one sets certain MS TCP/IP protocol settings (either directly or via
456 DHCP) that these do get written to the registry. Even though a subsequent
457 change of setting may occur the old value may persist in the registry. This
458 has been known to create serious networking problems.</P
459 ><P
460 >An example of this occurs when a manual TCP/IP environment is configured to
461 include a NetBIOS Scope. In this event, when the administrator then changes the
462 configuration of the MS TCP/IP protocol stack, without first deleting the
463 current settings, by simply checking the box to configure the MS TCP/IP stack
464 via DHCP then the NetBIOS Scope that is still persistent in the registry WILL be
465 applied to the resulting DHCP offered settings UNLESS the DHCP server also sets
466 a NetBIOS Scope. It may therefore be prudent to forcibly apply a NULL NetBIOS
467 Scope from your DHCP server. The can be done in the dhcpd.conf file with the
468 parameter:
469 <B
470 CLASS="COMMAND"
471 >option netbios-scope "";</B
472 ></P
473 ><P
474 >While it is true that the Microsoft DHCP server that comes with Windows NT
475 Server provides only a sub-set of rfc1533 functionality this is hardly an issue
476 in those sites that already have a large investment and commitment to Unix
477 systems and technologies. The current state of the art of the DHCP Server
478 specification in covered in rfc2132.</P
479 ></DIV
480 ><DIV
481 CLASS="SECT1"
482 ><H1
483 CLASS="SECT1"
484 ><A
485 NAME="AEN338"
486 >6.4. How can I assign NetBIOS names to clients with DHCP?</A
487 ></H1
488 ><P
489 >SMB network clients need to be configured so that all standard TCP/IP name to
490 address resolution works correctly. Once this has been achieved the SMB
491 environment provides additional tools and services that act as helper agents in
492 the translation of SMB (NetBIOS) names to their appropriate IP Addresses. One
493 such helper agent is the NetBIOS Name Server (NBNS) or as Microsoft called it
494 in their Windows NT Server implementation WINS (Windows Internet Name Server).</P
495 ><P
496 >A client needs to be configured so that it has a unique Machine (Computer)
497 Name.</P
498 ><P
499 >This can be done, but needs a few NT registry hacks and you need to be able to
500 speak UNICODE, which is of course no problem for a True Wizzard(tm) :)
501 Instructions on how to do this (including a small util for less capable
502 Wizzards) can be found at</P
503 ><P
504 ><A
505 HREF="http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html"
506 TARGET="_top"
507 >http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html</A
508 ></P
509 ></DIV
510 ><DIV
511 CLASS="SECT1"
512 ><H1
513 CLASS="SECT1"
514 ><A
515 NAME="AEN345"
516 >6.5. How do I convert between unix and dos text formats?</A
517 ></H1
518 ><P
519 >Jim barry has written an <A
520 HREF="ftp://samba.org/pub/samba/contributed/fixcrlf.zip"
521 TARGET="_top"
522 >excellent drag-and-drop cr/lf converter for
523 windows</A
524 >. Just drag your file onto the icon and it converts the file.</P
525 ><P
526 >The utilities unix2dos and dos2unix(in the mtools package) should do 
527 the job under unix.</P
528 ></DIV
529 ><DIV
530 CLASS="SECT1"
531 ><H1
532 CLASS="SECT1"
533 ><A
534 NAME="AEN350"
535 >6.6. Does samba have wins replication support?</A
536 ></H1
537 ><P
538 >At the time of writing there is currently being worked on a wins replication implementation(wrepld).</P
539 ></DIV
540 ></DIV
541 ><DIV
542 CLASS="NAVFOOTER"
543 ><HR
544 ALIGN="LEFT"
545 WIDTH="100%"><TABLE
546 SUMMARY="Footer navigation table"
547 WIDTH="100%"
548 BORDER="0"
549 CELLPADDING="0"
550 CELLSPACING="0"
551 ><TR
552 ><TD
553 WIDTH="33%"
554 ALIGN="left"
555 VALIGN="top"
556 ><A
557 HREF="faq-errors.html"
558 ACCESSKEY="P"
559 >Prev</A
560 ></TD
561 ><TD
562 WIDTH="34%"
563 ALIGN="center"
564 VALIGN="top"
565 ><A
566 HREF="samba-faq.html"
567 ACCESSKEY="H"
568 >Home</A
569 ></TD
570 ><TD
571 WIDTH="33%"
572 ALIGN="right"
573 VALIGN="top"
574 ><A
575 HREF="faq-printing.html"
576 ACCESSKEY="N"
577 >Next</A
578 ></TD
579 ></TR
580 ><TR
581 ><TD
582 WIDTH="33%"
583 ALIGN="left"
584 VALIGN="top"
585 >Common errors</TD
586 ><TD
587 WIDTH="34%"
588 ALIGN="center"
589 VALIGN="top"
590 >&nbsp;</TD
591 ><TD
592 WIDTH="33%"
593 ALIGN="right"
594 VALIGN="top"
595 >Printing problems</TD
596 ></TR
597 ></TABLE
598 ></DIV
599 ></BODY
600 ></HTML
601 >