/[gentoo]/xml/htdocs/doc/en/quick-samba-howto.xml
Gentoo

Diff of /xml/htdocs/doc/en/quick-samba-howto.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.9
1<?xml version = '1.0' encoding = 'UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/quick-samba-howto.xml,v 1.9 2004/08/01 11:40:20 swift Exp $ -->
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3<guide link="quick-samba-howto.xml"> 4<guide link="quick-samba-howto.xml">
4<title>Gentoo Samba3/CUPS/Clam AV HOWTO</title> 5<title>Gentoo Samba3/CUPS/Clam AV HOWTO</title>
5<author title="Author"> 6<author title="Author">
6 <mail link="daff at dword dot org">Andreas "daff" Ntaflos</mail> 7 <mail link="daff at dword dot org">Andreas "daff" Ntaflos</mail>
17 18
18<!-- The content of this document is licensed under the CC-BY-SA license --> 19<!-- The content of this document is licensed under the CC-BY-SA license -->
19<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 20<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
20<license/> 21<license/>
21 22
22<version>1.3</version> 23<version>1.6</version>
23<date>May 18, 2004</date> 24<date>August 01, 2004</date>
24 25
25<chapter> 26<chapter>
26<title>Introduction to this HOWTO</title> 27<title>Introduction to this HOWTO</title>
27<section> 28<section>
28<title>Purpose</title> 29<title>Purpose</title>
29<body> 30<body>
30 31
31<p> 32<p>
32This HOWTO is designed to help you move a network from many different 33This HOWTO is designed to help you move a network from many different
33clients speaking different languages, to many different manchines that 34clients speaking different languages, to many different machines that
34speak a common language. The ultimate goal is to help differing 35speak a common language. The ultimate goal is to help differing
35architectures and technologies, come together in a productive, 36architectures and technologies, come together in a productive,
36happily coexisting environment. 37happily coexisting environment.
37</p> 38</p>
38 39
85<section> 86<section>
86<title>Before you use this guide</title> 87<title>Before you use this guide</title>
87<body> 88<body>
88 89
89<p> 90<p>
90There are a several other guides for setting up CUPS and/or Samba, 91There are a several other guides for setting up CUPS and/or Samba, please read
91please read them as well, as they may tell you things left out of this 92them as well, as they may tell you things left out of this HOWTO (intentional
92HOWTO (intentional or otherwise). One such document is the very useful 93or otherwise). One such document is the very useful and well written <uri
93and well written <uri link="http://www.gentoo.org/doc/en/printing-howto.xml">Gentoo 94link="/doc/en/printing-howto.xml">Gentoo Printing Guide</uri>, as configuration
94Printing Guide</uri>, as configuration issues and specific printer setup 95issues and specific printer setup is not discussed here.
95is not discussed here.
96</p> 96</p>
97 97
98</body> 98</body>
99</section> 99</section>
100<section> 100<section>
141We will need the following: 141We will need the following:
142</p> 142</p>
143 143
144<ul> 144<ul>
145 <li>net-fs/samba</li> 145 <li>net-fs/samba</li>
146 <li>net-mail/clamav</li> 146 <li>app-antivirus/clamav</li>
147 <li>net-print/cups</li> 147 <li>net-print/cups</li>
148 <li>net-print/foomatic</li> 148 <li>net-print/foomatic</li>
149 <li>net-print/hpijs (if you have an HP printer)</li> 149 <li>net-print/hpijs (if you have an HP printer)</li>
150 <li>A kernel of sorts (preferably 2.4.24+ or 2.6.x)</li> 150 <li>A kernel of sorts (preferably 2.4.24+ or 2.6.x)</li>
151 <li>A printer (PS or non-PS, maybe not TOO new or fancy)</li> 151 <li>A printer (PS or non-PS, maybe not TOO new or fancy)</li>
156 156
157<p> 157<p>
158The main package we use here is net-fs/samba, however, you will need 158The main package we use here is net-fs/samba, however, you will need
159a kernel with smbfs support enabled in order to mount a samba or windows 159a kernel with smbfs support enabled in order to mount a samba or windows
160share from another computer. CUPS will be emerged if it is not already. 160share from another computer. CUPS will be emerged if it is not already.
161net-mail/clamav will be used also, but others should be easily adapted 161app-antivirus/clamav will be used also, but others should be easily adapted
162to work with Samba. 162to work with Samba.
163</p> 163</p>
164 164
165</body> 165</body>
166</section> 166</section>
167</chapter> 167</chapter>
168
168<chapter> 169<chapter>
169<title>Getting acquainted with Samba</title> 170<title>Getting acquainted with Samba</title>
170<section> 171<section>
171<title>The USE Flags</title> 172<title>The USE Flags</title>
172<body> 173<body>
300</ul> 301</ul>
301 302
302</body> 303</body>
303</section> 304</section>
304</chapter> 305</chapter>
306
305<chapter> 307<chapter>
306<title>Server Software Installation</title> 308<title>Server Software Installation</title>
307<section> 309<section>
308<title>Emerging Samba</title> 310<title>Emerging Samba</title>
309<body> 311<body>
359virus scanning, the actual virus scanner must be emerged. The scanner 361virus scanning, the actual virus scanner must be emerged. The scanner
360used in this HOWTO is Clam AV. 362used in this HOWTO is Clam AV.
361</p> 363</p>
362 364
363<pre caption="Emerge clam-av"> 365<pre caption="Emerge clam-av">
364# <i>emerge net-mail/clamav</i> 366# <i>emerge app-antivirus/clamav</i>
365</pre> 367</pre>
366 368
367</body> 369</body>
368</section> 370</section>
369<section> 371<section>
389</pre> 391</pre>
390 392
391</body> 393</body>
392</section> 394</section>
393</chapter> 395</chapter>
396
394<chapter> 397<chapter>
395<title>Server Configuration</title> 398<title>Server Configuration</title>
396<section> 399<section>
397<title>Configuring Samba</title> 400<title>Configuring Samba</title>
398<body> 401<body>
442guest ok = yes 445guest ok = yes
443<comment># We now will implement the on access virus scanner. 446<comment># We now will implement the on access virus scanner.
444# NOTE: By putting this in our [Global] section, we enable 447# NOTE: By putting this in our [Global] section, we enable
445# scanning of ALL shares, you could optionally move 448# scanning of ALL shares, you could optionally move
446# these to a specific share and only scan it.</comment> 449# these to a specific share and only scan it.</comment>
450
451<comment># For Samba 3.x</comment>
452vfs object = vscan-clamav
453vscan-clamav: config-file = /etc/samba/vscan-clamav.conf
454
455<comment># For Samba 2.2.x</comment>
447vfs object = /usr/lib/samba/vfs/vscan-clamav.so 456vfs object = /usr/lib/samba/vfs/vscan-clamav.so
448vfs options = config-file = /etc/samba/vscan-clamav.conf 457vfs options = config-file = /etc/samba/vscan-clamav.conf
449 458
450<comment># Now we setup our print drivers information!</comment> 459<comment># Now we setup our print drivers information!</comment>
451[print$] 460[print$]
494guest ok = yes 503guest ok = yes
495path = /home/samba/public 504path = /home/samba/public
496</pre> 505</pre>
497 506
498<warn> 507<warn>
499
500If you like to use Samba's guest account to do anything concerning 508If you like to use Samba's guest account to do anything concerning
501printing from Windows clients: don't set <c>guest only = yes</c> in 509printing from Windows clients: don't set <c>guest only = yes</c> in
502the <c>[global]</c> section. The guest account seems to cause 510the <c>[global]</c> section. The guest account seems to cause
503problems when running <c>cupsaddsmb</c> sometimes when trying to 511problems when running <c>cupsaddsmb</c> sometimes when trying to
504connect from Windows machines. See below, too, when we talk about 512connect from Windows machines. See below, too, when we talk about
535<p> 543<p>
536The Samba passwords need not be the same as the system passwords 544The Samba passwords need not be the same as the system passwords
537in <path>/etc/passwd</path>. 545in <path>/etc/passwd</path>.
538</p> 546</p>
539 547
548<p>
549You will also need to update <path>/etc/nsswitch.conf</path> so that Windows
550systems can be found easily using NetBIOS:
551</p>
552
553<pre caption="Editing /etc/nsswitch.conf">
554# <i>nano -w /etc/nsswitch.conf</i>
555<comment>(Edit the hosts: line)</comment>
556hosts: files dns <i>wins</i>
557</pre>
558
540</body> 559</body>
541</section> 560</section>
542<section> 561<section>
543<title>Configuring Clam AV</title> 562<title>Configuring Clam AV</title>
544<body> 563<body>
571 590
572<comment>; if communication to clamd fails, should access to file denied? 591<comment>; if communication to clamd fails, should access to file denied?
573; (default: yes)</comment> 592; (default: yes)</comment>
574deny access on error = yes 593deny access on error = yes
575 594
576<comment>; if daemon files with a minor error (corruption, etc.), 595<comment>; if daemon fails with a minor error (corruption, etc.),
577; should access to file denied? 596; should access to file denied?
578; (default: yes)</comment> 597; (default: yes)</comment>
579deny access on minor error = yes 598deny access on minor error = yes
580 599
581<comment>; send a warning message via Windows Messenger service 600<comment>; send a warning message via Windows Messenger service
599; of period, samba-vscan use a last recently used file mechanism to avoid 618; of period, samba-vscan use a last recently used file mechanism to avoid
600; multiple scans of a file. This setting specified the maximum number of 619; multiple scans of a file. This setting specified the maximum number of
601; elements of the last recently used file list. (default: 100)</comment> 620; elements of the last recently used file list. (default: 100)</comment>
602max lru files entries = 100 621max lru files entries = 100
603 622
604<comment>; an entry is invalidad after lru file entry lifetime (in seconds). 623<comment>; an entry is invalidated after lru file entry lifetime (in seconds).
605; (Default: 5)</comment> 624; (Default: 5)</comment>
606lru file entry lifetime = 5 625lru file entry lifetime = 5
607 626
608<comment>; socket name of clamd (default: /var/run/clamd)</comment> 627<comment>; socket name of clamd (default: /var/run/clamd)</comment>
609clamd socket name = /var/run/clamd 628clamd socket name = /var/run/clamd
706<section> 725<section>
707<title>Installing a printer for and with CUPS</title> 726<title>Installing a printer for and with CUPS</title>
708<body> 727<body>
709 728
710<p> 729<p>
711First, go to <uri link="http://linuxprinting.org">LinuxPrinting.Org</uri> 730First, go to <uri link="http://linuxprinting.org">LinuxPrinting.Org</uri> to
712to find and download the correct PPD file for your printer and CUPS. To 731find and download the correct PPD file for your printer and CUPS. To do so,
713do so, click the link Printer Listings to the left. Select your 732click the link Printer Listings to the left. Select your printers manufacturer
714printers manufacturer and the model in the pulldown menu, eg HP and 733and the model in the pulldown menu, eg HP and DeskJet 930C. Click "Show". On
715DeskJet 930C. Click "Show". On the page coming up click the "recommended 734the page coming up click the "recommended driver" link after reading the
716driver" link after reading the various notes and information. Then fetch 735various notes and information. Then fetch the PPD file from the next page,
717the PPD file from the next page, again after reading the notes and 736again after reading the notes and introductions there. You may have to select
718introductions there. You may have to select your printers manufacturer 737your printers manufacturer and model again. Reading the <uri
719and model again. Reading the <uri link="http://www.linuxprinting.org/cups-doc.html">CUPS 738link="http://www.linuxprinting.org/cups-doc.html">CUPS quickstart guide</uri>
720quickstart guide</uri> is also very helpful when working with CUPS. 739is also very helpful when working with CUPS.
721</p> 740</p>
722 741
723<p> 742<p>
724Now you have a PPD file for your printer to work with CUPS. Place it in 743Now you have a PPD file for your printer to work with CUPS. Place it in
725<path>/usr/share/cups/model</path>. The PPD for the HP DeskJet 930C was 744<path>/usr/share/cups/model</path>. The PPD for the HP DeskJet 930C was
830</pre> 849</pre>
831 850
832<warn> 851<warn>
833The execution of this command often causes the most trouble. 852The execution of this command often causes the most trouble.
834Reading through the <uri 853Reading through the <uri
835link="http://forums.gentoo.com/viewtopic.php?t=110931">posts in this 854link="http://forums.gentoo.org/viewtopic.php?t=110931">posts in this
836thread</uri>. 855thread</uri>.
837</warn> 856</warn>
838 857
839<p> 858<p>
840Here are common errors that may happen: 859Here are common errors that may happen:
950</pre> 969</pre>
951 970
952</body> 971</body>
953</section> 972</section>
954</chapter> 973</chapter>
974
955<chapter> 975<chapter>
956<title>Configuration of the Clients</title> 976<title>Configuration of the Clients</title>
957<section> 977<section>
958<title>Printer configuration of *nix based clients</title> 978<title>Printer configuration of *nix based clients</title>
959<body> 979<body>
961<p> 981<p>
962Despite the variation or distribution, the only thing needed is CUPS. 982Despite the variation or distribution, the only thing needed is CUPS.
963Do the equivalent on any other UNIX/Linux/BSD client. 983Do the equivalent on any other UNIX/Linux/BSD client.
964</p> 984</p>
965 985
966<pre caption="Configuring a Gentoo system."> 986<pre caption="Configuring a Gentoo system">
967# <i>emerge cups</i> 987# <i>emerge cups</i>
968# <i>/etc/init.d/cupsd start</i> 988# <i>/etc/init.d/cupsd start</i>
969# <i>rc-update add cupsd default</i> 989# <i>rc-update add cupsd default</i>
970</pre> 990</pre>
971 991
1028<section> 1048<section>
1029<title>Mounting a Windows or Samba share in GNU/Linux</title> 1049<title>Mounting a Windows or Samba share in GNU/Linux</title>
1030<body> 1050<body>
1031 1051
1032<p> 1052<p>
1033Now is time to configure our kernel to support smbfs. Since I'm 1053Now is time to configure our kernel to support smbfs. Since I'm assumming we've
1034assumming we've all compiled at least one kernel, we'll need to make 1054all compiled at least one kernel, we'll need to make sure we have all the right
1035sure we have all the right options selected in our kernel. 1055options selected in our kernel. For simplicity sake, make it a module for ease
1036For simplicity sake, make it a module for ease of use. It is the
1037authors opinion that kernel modules are a good thing and should be used 1056of use. It is the author's opinion that kernel modules are a good thing and
1038whenever possible. 1057should be used whenever possible.
1039</p> 1058</p>
1040 1059
1041<pre caption="Relevant kernel options" > 1060<pre caption="Relevant kernel options" >
1042CONFIG_SMB_FS=m 1061CONFIG_SMB_FS=m
1043CONFIG_SMB_UNIX=y 1062CONFIG_SMB_UNIX=y
1087</p> 1106</p>
1088 1107
1089</body> 1108</body>
1090</section> 1109</section>
1091</chapter> 1110</chapter>
1111
1092<chapter> 1112<chapter>
1093<title>Final Notes</title> 1113<title>Final Notes</title>
1094<section> 1114<section>
1095<title>A Fond Farewell</title> 1115<title>A Fond Farewell</title>
1096<body> 1116<body>
1102</p> 1122</p>
1103 1123
1104</body> 1124</body>
1105</section> 1125</section>
1106</chapter> 1126</chapter>
1127
1107<chapter> 1128<chapter>
1108<title>Links and Resources</title> 1129<title>Links and Resources</title>
1109<section> 1130<section>
1110<title>Links</title> 1131<title>Links</title>
1111<body> 1132<body>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.20