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