Rebuild docs
[Samba/vl.git] / docs / faq / FAQ-features.html
blob9bcd8437b85ad15036fa5ee0d873817f853b6f8f
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 6. Features</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.59.1"><link rel="home" href="samba-faq.html" title="Samba FAQ"><link rel="up" href="samba-faq.html" title="Samba FAQ"><link rel="previous" href="FAQ-errors.html" title="Chapter 5. Common errors"><link rel="next" href="FAQ-Printing.html" title="Chapter 7. Printing problems"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 6. Features</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="FAQ-errors.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="FAQ-Printing.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><h2 class="title"><a name="FAQ-features"></a>Chapter 6. Features</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="FAQ-features.html#id2874269">How can I prevent my samba server from being used to distribute the Nimda worm?</a></dt><dt><a href="FAQ-features.html#id2874209">How can I use samba as a fax server?</a></dt><dd><dl><dt><a href="FAQ-features.html#id2874628">Tools for printing faxes</a></dt><dt><a href="FAQ-features.html#id2874681">Making the fax-server</a></dt><dt><a href="FAQ-features.html#id2874774">Installing the client drivers</a></dt><dt><a href="FAQ-features.html#id2874858">Example smb.conf</a></dt></dl></dd><dt><a href="FAQ-features.html#id2874883">Samba doesn't work well together with DHCP!</a></dt><dt><a href="FAQ-features.html#id2874531">How can I assign NetBIOS names to clients with DHCP?</a></dt><dt><a href="FAQ-features.html#id2874581">How do I convert between unix and dos text formats?</a></dt><dt><a href="FAQ-features.html#id2874612">Does samba have wins replication support?</a></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2874269"></a>How can I prevent my samba server from being used to distribute the Nimda worm?</h2></div></div><p>Author: HASEGAWA Yosuke (translated by <a href="monyo@samba.gr.jp" target="_top">TAKAHASHI Motonobu</a>)</p><p>
3 Nimba Worm is infected through shared disks on a network, as well as through
4 Microsoft IIS, Internet Explorer and mailer of Outlook series.
5 </p><p>
6 At this time, the worm copies itself by the name *.nws and *.eml on
7 the shared disk, moreover, by the name of Riched20.dll in the folder
8 where *.doc file is included.
9 </p><p>
10 To prevent infection through the shared disk offered by Samba, set
11 up as follows:
12 </p><p>
13 </p><pre class="programlisting">
14 [global]
15 ...
16 # This can break Administration installations of Office2k.
17 # in that case, don't veto the riched20.dll
18 veto files = /*.eml/*.nws/riched20.dll/
19 </pre><p>
20 </p><p>
21 By setting the &quot;veto files&quot; parameter, matched files on the Samba
22 server are completely hidden from the clients and making it impossible
23 to access them at all.
24 </p><p>
25 In addition to it, the following setting is also pointed out by the
26 samba-jp:09448 thread: when the
27 &quot;readme.txt.{3050F4D8-98B5-11CF-BB82-00AA00BDCE0B}&quot; file exists on
28 a Samba server, it is visible only as &quot;readme.txt&quot; and dangerous
29 code may be executed if this file is double-clicked.
30 </p><p>
31 Setting the following,
32 </p><pre class="programlisting">
33 veto files = /*.{*}/
34 </pre><p>
35 any files having CLSID in its file extension will be inaccessible from any
36 clients.
37 </p><p>
38 This technical article is created based on the discussion of
39 samba-jp:09448 and samba-jp:10900 threads.
40 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2874209"></a>How can I use samba as a fax server?</h2></div></div><p>Contributor: <a href="mailto:zuber@berlin.snafu.de" target="_top">Gerhard Zuber</a></p><p>Requirements:
41 </p><table class="simplelist" border="0" summary="Simple list"><tr><td>UNIX box (Linux preferred) with SAMBA and a faxmodem</td></tr><tr><td>ghostscript package</td></tr><tr><td>mgetty+sendfax package</td></tr><tr><td>pbm package (portable bitmap tools)</td></tr></table><p>
42 </p><p>First, install and configure the required packages. Be sure to read the mgetty+sendfax
43 manual carefully.</p><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2874628"></a>Tools for printing faxes</h3></div></div><p>Your incomed faxes are in:
44 <tt>/var/spool/fax/incoming</tt>. Print it with:</p><pre class="programlisting">
45 for i in *
47 g3cat $i | g3tolj | lpr -P hp
48 done
49 </pre><p>
50 </p><p>
51 g3cat is in the tools-section, g3tolj is in the contrib-section
52 for printing to HP lasers.
53 </p><p>
54 If you want to produce files for displaying and printing with Windows, use
55 some tools from the pbm-package like the following command: <b>g3cat $i | g3topbm - | ppmtopcx - &gt;$i.pcx</b>
56 and view it with your favourite Windows tool (maybe paintbrush)
57 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2874681"></a>Making the fax-server</h3></div></div><p>fetch the file <tt>mgetty+sendfax/frontends/winword/faxfilter</tt> and place it in <tt>/usr/local/etc/mgetty+sendfax/</tt>(replace /usr/local/ with whatever place you installed mgetty+sendfax)</p><p>prepare your faxspool file as mentioned in this file
58 edit fax/faxspool.in and reinstall or change the final
59 /usr/local/bin/faxspool too.
60 </p><pre class="programlisting">
61 if [ &quot;$user&quot; = &quot;root&quot; -o &quot;$user&quot; = &quot;fax&quot; -o \
62 &quot;$user&quot; = &quot;lp&quot; -o &quot;$user&quot; = &quot;daemon&quot; -o &quot;$user&quot; = &quot;bin&quot; ]
63 </pre><p>find the first line and change it to the second.</p><p>
64 make sure you have pbmtext (from the pbm-package). This is
65 needed for creating the small header line on each page.
66 </p><p>Prepare your faxheader <tt>/usr/local/etc/mgetty+sendfax/faxheader</tt></p><p>
67 Edit your /etc/printcap file:
68 </p><pre class="programlisting">
69 # FAX
70 lp3|fax:\
71 :lp=/dev/null:\
72 :sd=/usr/spool/lp3:\
73 :if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#0:\
74 :lf=/usr/spool/lp3/fax-log:
75 </pre><p>Now, edit your <tt>smb.conf</tt> so you have a smb based printer named &quot;fax&quot;</p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2874774"></a>Installing the client drivers</h3></div></div><p>
76 Now you have a printer called &quot;fax&quot; which can be used via
77 TCP/IP-printing (lpd-system) or via SAMBA (windows printing).
78 </p><p>
79 On every system you are able to produce postscript-files you
80 are ready to fax.
81 </p><p>
82 On Windows 3.1 95 and NT:
83 </p><p>
84 Install a printer wich produces postscript output,
85 e.g. apple laserwriter
86 </p><p>Connect the &quot;fax&quot; to your printer.</p><p>
87 Now write your first fax. Use your favourite wordprocessor,
88 write, winword, notepad or whatever you want, and start
89 with the headerpage.
90 </p><p>
91 Usually each fax has a header page. It carries your name,
92 your address, your phone/fax-number.
93 </p><p>
94 It carries also the recipient, his address and his *** fax
95 number ***. Now here is the trick:
96 </p><p>
97 Use the text:
98 </p><pre class="programlisting">
99 Fax-Nr: 123456789
100 </pre><p>
101 as the recipients fax-number. Make sure this text does not
102 occur in regular text ! Make sure this text is not broken
103 by formatting information, e.g. format it as a single entity.
104 (Windows Write and Win95 Wordpad are functional, maybe newer
105 versions of Winword are breaking formatting information).
106 </p><p>
107 The trick is that postscript output is human readable and
108 the faxfilter program scans the text for this pattern and
109 uses the found number as the fax-destination-number.
110 </p><p>
111 Now print your fax through the fax-printer and it will be
112 queued for later transmission. Use faxrunq for sending the
113 queue out.
114 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><h3 class="title"><a name="id2874858"></a>Example smb.conf</h3></div></div><pre class="programlisting">
115 [global]
116 printcap name = /etc/printcap
117 print command = /usr/bin/lpr -r -P %p %s
118 lpq command = /usr/bin/lpq -P %p
119 lprm command = /usr/bin/lprm -P %p %j
121 [fax]
122 comment = FAX (mgetty+sendfax)
123 path = /tmp
124 printable = yes
125 public = yes
126 writable = no
127 create mode = 0700
128 browseable = yes
129 guest ok = no
130 </pre></div></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2874883"></a>Samba doesn't work well together with DHCP!</h2></div></div><p>
131 We wish to help those folks who wish to use the ISC DHCP Server and provide
132 sample configuration settings. Most operating systems today come ship with
133 the ISC DHCP Server. ISC DHCP is available from:
134 <a href="ftp://ftp.isc.org/isc/dhcp" target="_top">ftp://ftp.isc.org/isc/dhcp</a>
135 </p><p>
136 Incorrect configuration of MS Windows clients (Windows9X, Windows ME, Windows
137 NT/2000) will lead to problems with browsing and with general network
138 operation. Windows 9X/ME users often report problems where the TCP/IP and related
139 network settings will inadvertantly become reset at machine start-up resulting
140 in loss of configuration settings. This results in increased maintenance
141 overheads as well as serious user frustration.
142 </p><p>
143 In recent times users on one mailing list incorrectly attributed the cause of
144 network operating problems to incorrect configuration of Samba.
145 </p><p>
146 One user insisted that the only way to provent Windows95 from periodically
147 performing a full system reset and hardware detection process on start-up was
148 to install the NetBEUI protocol in addition to TCP/IP. This assertion is not
149 correct.
150 </p><p>
151 In the first place, there is NO need for NetBEUI. All Microsoft Windows clients
152 natively run NetBIOS over TCP/IP, and that is the only protocol that is
153 recognised by Samba. Installation of NetBEUI and/or NetBIOS over IPX will
154 cause problems with browse list operation on most networks. Even Windows NT
155 networks experience these problems when incorrectly configured Windows95
156 systems share the same name space. It is important that only those protocols
157 that are strictly needed for site specific reasons should EVER be installed.
158 </p><p>
159 Secondly, and totally against common opinion, DHCP is NOT an evil design but is
160 an extension of the BOOTP protocol that has been in use in Unix environments
161 for many years without any of the melt-down problems that some sensationalists
162 would have us believe can be experienced with DHCP. In fact, DHCP in covered by
163 rfc1541 and is a very safe method of keeping an MS Windows desktop environment
164 under control and for ensuring stable network operation.
165 </p><p>
166 Please note that MS Windows systems as of MS Windows NT 3.1 and MS Windows 95
167 store all network configuration settings a registry. There are a few reports
168 from MS Windows network administrators that warrant mention here. It would appear
169 that when one sets certain MS TCP/IP protocol settings (either directly or via
170 DHCP) that these do get written to the registry. Even though a subsequent
171 change of setting may occur the old value may persist in the registry. This
172 has been known to create serious networking problems.
173 </p><p>
174 An example of this occurs when a manual TCP/IP environment is configured to
175 include a NetBIOS Scope. In this event, when the administrator then changes the
176 configuration of the MS TCP/IP protocol stack, without first deleting the
177 current settings, by simply checking the box to configure the MS TCP/IP stack
178 via DHCP then the NetBIOS Scope that is still persistent in the registry WILL be
179 applied to the resulting DHCP offered settings UNLESS the DHCP server also sets
180 a NetBIOS Scope. It may therefore be prudent to forcibly apply a NULL NetBIOS
181 Scope from your DHCP server. The can be done in the dhcpd.conf file with the
182 parameter:
183 <b>option netbios-scope &quot;&quot;;</b>
184 </p><p>
185 While it is true that the Microsoft DHCP server that comes with Windows NT
186 Server provides only a sub-set of rfc1533 functionality this is hardly an issue
187 in those sites that already have a large investment and commitment to Unix
188 systems and technologies. The current state of the art of the DHCP Server
189 specification in covered in rfc2132.
190 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2874531"></a>How can I assign NetBIOS names to clients with DHCP?</h2></div></div><p>
191 SMB network clients need to be configured so that all standard TCP/IP name to
192 address resolution works correctly. Once this has been achieved the SMB
193 environment provides additional tools and services that act as helper agents in
194 the translation of SMB (NetBIOS) names to their appropriate IP Addresses. One
195 such helper agent is the NetBIOS Name Server (NBNS) or as Microsoft called it
196 in their Windows NT Server implementation WINS (Windows Internet Name Server).
197 </p><p>
198 A client needs to be configured so that it has a unique Machine (Computer)
199 Name.
200 </p><p>
201 This can be done, but needs a few NT registry hacks and you need to be able to
202 speak UNICODE, which is of course no problem for a True Wizzard(tm) :)
203 Instructions on how to do this (including a small util for less capable
204 Wizzards) can be found at
205 </p><p><a href="http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html" target="_top">http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html</a></p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2874581"></a>How do I convert between unix and dos text formats?</h2></div></div><p>
206 Jim barry has written an <a href="ftp://samba.org/pub/samba/contributed/fixcrlf.zip" target="_top">
207 excellent drag-and-drop cr/lf converter for
208 windows</a>. Just drag your file onto the icon and it converts the file.
209 </p><p>
210 The utilities unix2dos and dos2unix(in the mtools package) should do
211 the job under unix.
212 </p></div><div class="sect1" lang="en"><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="id2874612"></a>Does samba have wins replication support?</h2></div></div><p>
213 At the time of writing there is currently being worked on a wins replication implementation(wrepld).
214 </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="FAQ-errors.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="samba-faq.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="FAQ-Printing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 5. Common errors </td><td width="20%" align="center"><a accesskey="h" href="samba-faq.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Printing problems</td></tr></table></div></body></html>