1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.7"><LINK
11 HREF=
"samba-faq.html"><LINK
14 HREF=
"faq-errors.html"><LINK
16 TITLE=
"Printing problems"
17 HREF=
"faq-printing.html"></HEAD
28 SUMMARY=
"Header navigation table"
45 HREF=
"faq-errors.html"
59 HREF=
"faq-printing.html"
74 >Chapter
6. Features
</H1
81 >6.1. How can I prevent my samba server from being used to distribute the Nimda worm?
</A
84 >Author: HASEGAWA Yosuke (translated by
<A
85 HREF=
"monyo@samba.gr.jp"
87 >TAKAHASHI Motonobu
</A
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
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
97 >To prevent infection through the shared disk offered by Samba, set
101 CLASS=
"PROGRAMLISTING"
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
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,
121 CLASS=
"PROGRAMLISTING"
122 > veto files = /*.{*}/
</PRE
124 any files having CLSID in its file extension will be inaccessible from any
127 >This technical article is created based on the discussion of
128 samba-jp:
09448 and samba-jp:
10900 threads.
</P
136 >6.2. How can I use samba as a fax server?
</A
140 HREF=
"mailto:zuber@berlin.snafu.de"
153 >UNIX box (Linux preferred) with SAMBA and a faxmodem
</TD
157 >ghostscript package
</TD
161 >mgetty+sendfax package
</TD
165 >pbm package (portable bitmap tools)
</TD
173 >First, install and configure the required packages. Be sure to read the mgetty+sendfax
181 >6.2.1. Tools for printing faxes
</A
184 >Your incomed faxes are in:
187 >/var/spool/fax/incoming
</TT
191 CLASS=
"PROGRAMLISTING"
194 g3cat $i | g3tolj | lpr -P hp
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
204 >g3cat $i | g3topbm - | ppmtopcx -
>$i.pcx
</B
206 and view it with your favourite Windows tool (maybe paintbrush)
</P
214 >6.2.2. Making the fax-server
</A
219 >mgetty+sendfax/frontends/winword/faxfilter
</TT
220 > and place it in
<TT
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
230 CLASS=
"PROGRAMLISTING"
231 >if [
"$user" =
"root" -o
"$user" =
"fax" -o \
232 "$user" =
"lp" -o
"$user" =
"daemon" -o
"$user" =
"bin" ]
</PRE
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
242 >/usr/local/etc/mgetty+sendfax/faxheader
</TT
245 >Edit your /etc/printcap file:
247 CLASS=
"PROGRAMLISTING"
252 :if=/usr/local/etc/mgetty+sendfax/faxfilter:sh:sf:mx#
0:\
253 :lf=/usr/spool/lp3/fax-log:
</PRE
259 > so you have a smb based printer named
"fax"</P
267 >6.2.3. Installing the client drivers
</A
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
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
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
318 >6.2.4. Example smb.conf
</A
322 CLASS=
"PROGRAMLISTING"
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
330 comment = FAX (mgetty+sendfax)
347 >6.3. Samba doesn't work well together with DHCP!
</A
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"
356 >ftp://ftp.isc.org/isc/dhcp
</A
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
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
408 >option netbios-scope
"";
</B
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
423 >6.4. How can I assign NetBIOS names to clients with DHCP?
</A
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)
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"
444 >http://www.unixtools.org/~nneul/sw/nt/dhcp-netbios-hostname.html
</A
453 >6.5. How do I convert between unix and dos text formats?
</A
456 >Jim barry has written an
<A
457 HREF=
"ftp://samba.org/pub/samba/contributed/fixcrlf.zip"
459 >excellent drag-and-drop cr/lf converter for
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
472 >6.6. Does samba have wins replication support?
</A
475 >At the time of writing there is currently being worked on a wins replication implementation(wrepld).
</P
483 SUMMARY=
"Footer navigation table"
494 HREF=
"faq-errors.html"
503 HREF=
"samba-faq.html"
512 HREF=
"faq-printing.html"
532 >Printing problems
</TD