Docbook XML conversion: faq
[Samba/bb.git] / docs / docbook / faq / features.xml
blob66b05379cced73c029c262c8631abfeab6b6344d
1 <chapter id="FAQ-features">
3 <title>Features</title>
5 <sect1>
6 <title>How can I prevent my samba server from being used to distribute the Nimda worm?</title>
8 <para>Author: HASEGAWA Yosuke (translated by <ulink url="monyo@samba.gr.jp">TAKAHASHI Motonobu</ulink>)</para>
10 <para>
11 Nimba Worm is infected through shared disks on a network, as well as through
12 Microsoft IIS, Internet Explorer and mailer of Outlook series.
13 </para>
15 <para>
16 At this time, the worm copies itself by the name *.nws and *.eml on
17 the shared disk, moreover, by the name of Riched20.dll in the folder
18 where *.doc file is included.
19 </para>
21 <para>
22 To prevent infection through the shared disk offered by Samba, set
23 up as follows:
24 </para>
26 <para>
27 <programlisting>
28 [global]
29   ...
30   # This can break Administration installations of Office2k.
31   # in that case, don't veto the riched20.dll
32   veto files = /*.eml/*.nws/riched20.dll/
33 </programlisting>
34 </para>
36 <para>
37 By setting the "veto files" parameter, matched files on the Samba
38 server are completely hidden from the clients and making it impossible
39 to access them at all.
40 </para>
42 <para>
43 In addition to it, the following setting is also pointed out by the
44 samba-jp:09448 thread: when the
45 "readme.txt.{3050F4D8-98B5-11CF-BB82-00AA00BDCE0B}" file exists on
46 a Samba server, it is visible only as "readme.txt" and dangerous
47 code may be executed if this file is double-clicked.
48 </para>
50 <para>
51 Setting the following,
52 <programlisting>
53   veto files = /*.{*}/
54 </programlisting>
55 any files having CLSID in its file extension will be inaccessible from any
56 clients.
57 </para>
59 <para>
60 This technical article is created based on the discussion of
61 samba-jp:09448 and samba-jp:10900 threads.
62 </para>
63 </sect1>
65 <sect1>
66 <title>How can I use samba as a fax server?</title>
68 <para>Contributor: <ulink url="mailto:zuber@berlin.snafu.de">Gerhard Zuber</ulink></para>
70 <para>Requirements:
71 <simplelist>
72 <member>UNIX box (Linux preferred) with SAMBA and a faxmodem</member>
73 <member>ghostscript package</member>
74 <member>mgetty+sendfax package</member>
75 <member>pbm package (portable bitmap tools)</member>
76 </simplelist>
77 </para>
79 <para>First, install and configure the required packages. Be sure to read the mgetty+sendfax 
80 manual carefully.</para>
82 <sect2>
83 <title>Tools for printing faxes</title>
85 <para>Your incomed faxes are in:
86 <filename>/var/spool/fax/incoming</filename>. Print it with:</para>
88 <para><programlisting>
89 for i in *
91 g3cat $i | g3tolj | lpr -P hp
92 done
93 </programlisting>
94 </para>
96 <para>
97 g3cat is in the tools-section, g3tolj is in the contrib-section
98 for printing to HP lasers.
99 </para>
101 <para>
102 If you want to produce files for displaying and printing with Windows, use
103 some tools from the pbm-package like the following command: <command>g3cat $i | g3topbm - |  ppmtopcx - >$i.pcx</command>
104 and view it with your favourite Windows tool (maybe paintbrush)
105 </para>
107 </sect2>
109 <sect2>
110 <title>Making the fax-server</title>
112 <para>fetch the file <filename>mgetty+sendfax/frontends/winword/faxfilter</filename> and place it in <filename>/usr/local/etc/mgetty+sendfax/</filename>(replace /usr/local/ with whatever place you installed mgetty+sendfax)</para>
114 <para>prepare your faxspool file as mentioned in this file
115 edit fax/faxspool.in and reinstall or change the final
116 /usr/local/bin/faxspool too.
117 </para>
119 <para><programlisting>
120 if [ "$user" = "root" -o "$user" = "fax" -o \
121      "$user" = "lp" -o "$user" = "daemon" -o "$user" = "bin" ]
122 </programlisting></para>
124 <para>find the first line and change it to the second.</para>
126 <para>
127 make sure you have pbmtext (from the pbm-package). This is
128 needed for creating the small header line on each page.
129 </para>
131 <para>Prepare your faxheader <filename>/usr/local/etc/mgetty+sendfax/faxheader</filename></para>
133 <para>
134 Edit your /etc/printcap file:
135 <programlisting>
136 # FAX 
137 lp3|fax:\
138         :lp=/dev/null:\
139         :sd=/usr/spool/lp3:\
140         :if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
141         :lf=/usr/spool/lp3/fax-log:
142 </programlisting></para>
144 <para>Now, edit your <filename>smb.conf</filename> so you have a smb based printer named "fax"</para>
146 </sect2>
148 <sect2>
149 <title>Installing the client drivers</title>
151 <para>
152 Now you have a printer called "fax" which can be used via
153 TCP/IP-printing (lpd-system) or via SAMBA (windows printing).
154 </para>
156 <para>
157 On every system you are able to produce postscript-files you
158 are ready to fax.
159 </para>
161 <para>
162 On Windows 3.1 95 and NT:
163 </para>
165 <para>
166 Install a printer wich produces postscript output,
167    e.g.  apple laserwriter
168 </para>
170 <para>Connect the "fax" to your printer.</para>
172 <para>
173 Now write your first fax. Use your favourite wordprocessor,
174 write, winword, notepad or whatever you want, and start
175 with the headerpage.
176 </para>
178 <para>
179 Usually each fax has a header page. It carries your name,
180 your address, your phone/fax-number.
181 </para>
183 <para>
184 It carries also the recipient, his address and his *** fax
185 number ***. Now here is the trick:
186 </para>
188 <para>
189 Use the text:
190 <programlisting>
191 Fax-Nr: 123456789
192 </programlisting>
193 as the recipients fax-number. Make sure this text does not
194 occur in regular text ! Make sure this text is not broken
195 by formatting information, e.g. format it as a single entity.
196 (Windows Write and Win95 Wordpad are functional, maybe newer
197  versions of Winword are breaking formatting information).
198 </para>
200 <para>
201 The trick is that postscript output is human readable and
202 the faxfilter program scans the text for this pattern and
203 uses the found number as the fax-destination-number.
204 </para>
206 <para>
207 Now print your fax through the fax-printer and it will be
208 queued for later transmission. Use faxrunq for sending the
209 queue out.
210 </para>
212 </sect2>
214 <sect2>
215 <title>Example smb.conf</title>
217 <para><programlisting>
218 [global]
219  printcap name = /etc/printcap
220  print command = /usr/bin/lpr -r -P %p %s
221  lpq command = /usr/bin/lpq -P %p
222  lprm command = /usr/bin/lprm -P %p %j
224 [fax]
225     comment = FAX (mgetty+sendfax)
226     path = /tmp
227     printable = yes
228     public = yes
229     writable = no
230     create mode = 0700
231     browseable = yes
232     guest ok = no
233 </programlisting></para>
235 </sect2>
236 </sect1>
238 <sect1>
239 <title>Samba doesn't work well together with DHCP!</title>
241 <para>
242 We wish to help those folks who wish to use the ISC DHCP Server and provide
243 sample configuration settings. Most operating systems today come ship with
244 the ISC DHCP Server. ISC DHCP is available from:
245 <ulink url="ftp://ftp.isc.org/isc/dhcp">ftp://ftp.isc.org/isc/dhcp</ulink>
246 </para>
248 <para>
249 Incorrect configuration of MS Windows clients (Windows9X, Windows ME, Windows
250 NT/2000) will lead to problems with browsing and with general network
251 operation. Windows 9X/ME users often report problems where the TCP/IP and related
252 network settings will inadvertantly become reset at machine start-up resulting
253 in loss of configuration settings. This results in increased maintenance
254 overheads as well as serious user frustration.
255 </para>
257 <para>
258 In recent times users on one mailing list incorrectly attributed the cause of
259 network operating problems to incorrect configuration of Samba.
260 </para>
262 <para>
263 One user insisted that the only way to provent Windows95 from periodically
264 performing a full system reset and hardware detection process on start-up was
265 to install the NetBEUI protocol in addition to TCP/IP. This assertion is not
266 correct.
267 </para>
269 <para>
270 In the first place, there is NO need for NetBEUI. All Microsoft Windows clients
271 natively run NetBIOS over TCP/IP, and that is the only protocol that is
272 recognised by Samba. Installation of NetBEUI and/or NetBIOS over IPX will
273 cause problems with browse list operation on most networks. Even Windows NT
274 networks experience these problems when incorrectly configured Windows95
275 systems share the same name space. It is important that only those protocols
276 that are strictly needed for site specific reasons should EVER be installed.
277 </para>
279 <para>
280 Secondly, and totally against common opinion, DHCP is NOT an evil design but is
281 an extension of the BOOTP protocol that has been in use in Unix environments
282 for many years without any of the melt-down problems that some sensationalists
283 would have us believe can be experienced with DHCP. In fact, DHCP in covered by
284 rfc1541 and is a very safe method of keeping an MS Windows desktop environment
285 under control and for ensuring stable network operation.
286 </para>
288 <para>
289 Please note that MS Windows systems as of MS Windows NT 3.1 and MS Windows 95
290 store all network configuration settings a registry. There are a few reports
291 from MS Windows network administrators that warrant mention here. It would appear
292 that when one sets certain MS TCP/IP protocol settings (either directly or via
293 DHCP) that these do get written to the registry. Even though a subsequent
294 change of setting may occur the old value may persist in the registry. This
295 has been known to create serious networking problems.
296 </para>
298 <para>
299 An example of this occurs when a manual TCP/IP environment is configured to
300 include a NetBIOS Scope. In this event, when the administrator then changes the
301 configuration of the MS TCP/IP protocol stack, without first deleting the
302 current settings, by simply checking the box to configure the MS TCP/IP stack
303 via DHCP then the NetBIOS Scope that is still persistent in the registry WILL be
304 applied to the resulting DHCP offered settings UNLESS the DHCP server also sets
305 a NetBIOS Scope. It may therefore be prudent to forcibly apply a NULL NetBIOS
306 Scope from your DHCP server. The can be done in the dhcpd.conf file with the
307 parameter:
308 <command>option netbios-scope "";</command>
309 </para>
311 <para>
312 While it is true that the Microsoft DHCP server that comes with Windows NT
313 Server provides only a sub-set of rfc1533 functionality this is hardly an issue
314 in those sites that already have a large investment and commitment to Unix
315 systems and technologies. The current state of the art of the DHCP Server
316 specification in covered in rfc2132.
317 </para>
319 </sect1>
321 <sect1>
322 <title>How can I assign NetBIOS names to clients with DHCP?</title>
324 <para>
325 SMB network clients need to be configured so that all standard TCP/IP name to
326 address resolution works correctly. Once this has been achieved the SMB
327 environment provides additional tools and services that act as helper agents in
328 the translation of SMB (NetBIOS) names to their appropriate IP Addresses. One
329 such helper agent is the NetBIOS Name Server (NBNS) or as Microsoft called it
330 in their Windows NT Server implementation WINS (Windows Internet Name Server).
331 </para>
333 <para>
334 A client needs to be configured so that it has a unique Machine (Computer)
335 Name.
336 </para>
338 <para>
339 This can be done, but needs a few NT registry hacks and you need to be able to
340 speak UNICODE, which is of course no problem for a True Wizzard(tm) :)
341 Instructions on how to do this (including a small util for less capable
342 Wizzards) can be found at
343 </para>
345 <para><ulink url="http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html">http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html</ulink></para>
347 </sect1>
349 <sect1>
350 <title>How do I convert between unix and dos text formats?</title>
352 <para>
353 Jim barry has written an <ulink url="ftp://samba.org/pub/samba/contributed/fixcrlf.zip">
354 excellent drag-and-drop cr/lf converter for
355 windows</ulink>. Just drag your file onto the icon and it converts the file.
356 </para>
358 <para>
359 The utilities unix2dos and dos2unix(in the mtools package) should do 
360 the job under unix.
361 </para>
363 </sect1>
365 <sect1>
366 <title>Does samba have wins replication support?</title>
368 <para>
369 At the time of writing there is currently being worked on a wins replication implementation(wrepld).
370 </para>
372 </sect1>
374 </chapter>