/[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.17 Revision 1.28
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.17 2005/03/26 18:07:36 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/quick-samba-howto.xml,v 1.28 2007/06/06 22:42:25 nightmorph Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4<guide link="quick-samba-howto.xml"> 4<guide link="/doc/en/quick-samba-howto.xml">
5<title>Gentoo Samba3/CUPS/ClamAV HOWTO</title> 5<title>Gentoo Samba3/CUPS/ClamAV HOWTO</title>
6<author title="Author"> 6<author title="Author">
7 <mail link="daff at dword dot org">Andreas "daff" Ntaflos</mail> 7 <mail link="daff at dword dot org">Andreas "daff" Ntaflos</mail>
8</author> 8</author>
9<author title="Author"> 9<author title="Author">
18 18
19<!-- 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 -->
20<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 20<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
21<license/> 21<license/>
22 22
23<version>1.12</version> 23<version>1.17</version>
24<date>2005-03-26</date> 24<date>2007-06-06</date>
25 25
26<chapter> 26<chapter>
27<title>Introduction to this HOWTO</title> 27<title>Introduction to this HOWTO</title>
28<section> 28<section>
29<title>Purpose</title> 29<title>Purpose</title>
144<ul> 144<ul>
145 <li>net-fs/samba</li> 145 <li>net-fs/samba</li>
146 <li>app-antivirus/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/hplip (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 (2.6)</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>
152 <li> 152 <li>
153 A working network (home/office/etc) consisting of more than one machine) 153 A working network (home/office/etc) consisting of more than one machine)
154 </li> 154 </li>
155</ul> 155</ul>
172<section> 172<section>
173<title>The USE Flags</title> 173<title>The USE Flags</title>
174<body> 174<body>
175 175
176<p> 176<p>
177Before emerging anything, take a look at the various USE flags 177Before emerging anything, take a look at some of the various USE flags available
178available to Samba. 178to Samba.
179</p> 179</p>
180 180
181<pre caption="Samba uses the following USE Variables:"> 181<pre caption="Samba uses the following USE Variables:">
182kerberos mysql xml acl cups ldap pam readline python oav libclamav 182kerberos acl cups ldap pam readline python oav
183</pre> 183</pre>
184 184
185<p> 185<p>
186Depending on the network topology and the specific requirements of 186Depending on the network topology and the specific requirements of
187the server, the USE flags outlined below will define what to include or 187the server, the USE flags outlined below will define what to include or
197 <th><b>kerberos</b></th> 197 <th><b>kerberos</b></th>
198 <ti> 198 <ti>
199 Include support for Kerberos. The server will need this if it is 199 Include support for Kerberos. The server will need this if it is
200 intended to join an existing domain or Active Directory. See the note 200 intended to join an existing domain or Active Directory. See the note
201 below for more information. 201 below for more information.
202 </ti>
203</tr>
204<tr>
205 <th><b>mysql</b></th>
206 <ti>
207 This will allow Samba to use MySQL in order to do password authentication.
208 It will store ACLs, usernames, passwords, etc in a database versus a
209 flat file. If Samba is needed to do password authentication, such as
210 acting as a password validation server or a Primary Domain Controller
211 (PDC).
212 </ti>
213</tr>
214<tr>
215 <th><b>xml</b></th>
216 <ti>
217 The xml USE option for Samba provides a password database backend allowing
218 Samba to store account details in XML files, for the same reasons listed in
219 the mysql USE flag description.
220 </ti> 202 </ti>
221</tr> 203</tr>
222<tr> 204<tr>
223 <th><b>acl</b></th> 205 <th><b>acl</b></th>
224 <ti> 206 <ti>
275 Provides on-access scanning of Samba shares with FRISK F-Prot 257 Provides on-access scanning of Samba shares with FRISK F-Prot
276 Daemon, Kaspersky AntiVirus, OpenAntiVirus.org ScannerDaemon, Sophos Sweep 258 Daemon, Kaspersky AntiVirus, OpenAntiVirus.org ScannerDaemon, Sophos Sweep
277 (SAVI), Symantec CarrierScan, and Trend Micro (VSAPI). 259 (SAVI), Symantec CarrierScan, and Trend Micro (VSAPI).
278 </ti> 260 </ti>
279</tr> 261</tr>
280<tr>
281 <th><b>libclamav</b></th>
282 <ti>
283 Use the ClamAV library instead of the clamd daemon
284 </ti>
285</tr>
286</table> 262</table>
287 263
288<p> 264<p>
289A couple of things worth mentioning about the USE flags and different 265A couple of things worth mentioning about the USE flags and different
290Samba functions include: 266Samba functions include:
299 <li> 275 <li>
300 While Active Directory, ACL, and PDC functions are out of the intended 276 While Active Directory, ACL, and PDC functions are out of the intended
301 scope of this HOWTO, you may find these links as helpful to your cause: 277 scope of this HOWTO, you may find these links as helpful to your cause:
302 <ul> 278 <ul>
303 <li><uri>http://www.bluelightning.org/linux/samba_acl_howto/</uri></li> 279 <li><uri>http://www.bluelightning.org/linux/samba_acl_howto/</uri></li>
304 <li><uri>http://open-projects.linuxcare.com/research-papers/winbind-08162000.html</uri></li>
305 <li><uri>http://www.wlug.org.nz/HowtoSamba3AndActiveDirectory</uri></li> 280 <li><uri>http://www.wlug.org.nz/HowtoSamba3AndActiveDirectory</uri></li>
306 </ul> 281 </ul>
307 </li> 282 </li>
308</ul> 283</ul>
309 284
384</pre> 359</pre>
385 360
386</body> 361</body>
387</section> 362</section>
388<section> 363<section>
389<title>Emerging net-print/hpijs</title> 364<title>Emerging net-print/hplip</title>
390<body> 365<body>
391 366
392<p> 367<p>
393You only need to emerge this if you use an HP printer. 368You only need to emerge this if you use an HP printer.
394</p> 369</p>
395 370
396<pre caption="Emerge hpijs"> 371<pre caption="Emerge hplip">
397# <i>emerge net-print/hpijs</i> 372# <i>emerge net-print/hplip</i>
398</pre> 373</pre>
399 374
400</body> 375</body>
401</section> 376</section>
402</chapter> 377</chapter>
679in the example are the directives that need to be changed: 654in the example are the directives that need to be changed:
680</p> 655</p>
681 656
682<pre caption="/etc/cups/cupsd.conf"> 657<pre caption="/etc/cups/cupsd.conf">
683ServerName <i>PrintServer</i> <comment># your printserver name</comment> 658ServerName <i>PrintServer</i> <comment># your printserver name</comment>
684ServerAdmin <i>root@PrintServer</i> <comment># the person for printer-related hate-mail, eg you</comment> 659ServerAdmin <i>root@PrintServer</i> <comment># the person for printer-related hate-mail, e.g. you</comment>
685 660
686AccessLog /var/log/cups/access_log <comment># probably doesn't need changing</comment> 661AccessLog /var/log/cups/access_log <comment># probably doesn't need changing</comment>
687ErrorLog /var/log/cups/error_log <comment># doesn't really need changing either</comment> 662ErrorLog /var/log/cups/error_log <comment># doesn't really need changing either</comment>
688 663
689LogLevel debug <comment># only while isntalling and testing, should later be 664LogLevel debug <comment># only while isntalling and testing, should later be
690 # changed to 'info'</comment> 665 # changed to 'info'</comment>
691 666
692MaxClients 100 <comment># I've had to set this to 1000000000 or so because some time back, 667MaxClients 100 <comment># I've had to set this to 1000000000 or so because some time back,
693 # there seemed to be a bug in CUPS' controlling of the web interface, 668 # there seemed to be a bug in CUPS' controlling of the web interface,
694 # making CUPS think a denial of service attack was in progress when 669 # making CUPS think a denial of service attack was in progress when
695 # I tried to configure a printer with the web interface. weird.</comment> 670 # I tried to configure a printer with the web interface. weird.</comment>
698 673
699&lt;Location /&gt; 674&lt;Location /&gt;
700Order Deny,Allow 675Order Deny,Allow
701Deny From All 676Deny From All
702Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network 677Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network
703 # eg 192.168.1.* will allow connections from any host on 678 # e.g. 192.168.1.* will allow connections from any host on
704 # the 192.168.1.0 network. change to whatever suits you</comment> 679 # the 192.168.1.0 network. change to whatever suits you</comment>
705&lt;/Location&gt; 680&lt;/Location&gt;
706 681
707&lt;Location /admin&gt; 682&lt;Location /admin&gt;
708AuthType Basic 683AuthType Basic
754 729
755<p> 730<p>
756First, go to <uri link="http://linuxprinting.org">LinuxPrinting.Org</uri> to 731First, go to <uri link="http://linuxprinting.org">LinuxPrinting.Org</uri> to
757find and download the correct PPD file for your printer and CUPS. To do so, 732find and download the correct PPD file for your printer and CUPS. To do so,
758click the link Printer Listings to the left. Select your printers manufacturer 733click the link Printer Listings to the left. Select your printers manufacturer
759and the model in the pulldown menu, eg HP and DeskJet 930C. Click "Show". On 734and the model in the pulldown menu, e.g. HP and DeskJet 930C. Click "Show". On
760the page coming up click the "recommended driver" link after reading the 735the page coming up click the "recommended driver" link after reading the
761various notes and information. Then fetch the PPD file from the next page, 736various notes and information. Then fetch the PPD file from the next page,
762again after reading the notes and introductions there. You may have to select 737again after reading the notes and introductions there. You may have to select
763your printers manufacturer and model again. Reading the <uri 738your printers manufacturer and model again. Reading the <uri
764link="http://www.linuxprinting.org/cups-doc.html">CUPS quickstart guide</uri> 739link="http://www.linuxprinting.org/cups-doc.html">CUPS quickstart guide</uri>
773interface is found at <path>http://PrintServer:631</path> once CUPS is running. 748interface is found at <path>http://PrintServer:631</path> once CUPS is running.
774</p> 749</p>
775 750
776<pre caption="Install the printer via command line"> 751<pre caption="Install the printer via command line">
777# <i>lpadmin -p HPDeskJet930C -E -v usb:/dev/ultp0 -m HP-DeskJet_930C-hpijs.ppd</i> 752# <i>lpadmin -p HPDeskJet930C -E -v usb:/dev/ultp0 -m HP-DeskJet_930C-hpijs.ppd</i>
753# <i>/etc/init.d/cupsd restart</i>
778</pre> 754</pre>
779 755
780<p> 756<p>
781Remember to adjust to what you have. Be sure to have the name 757Remember to adjust to what you have. Be sure to have the name
782(<c>-p</c> argument) right (the name you set above during the Samba 758(<c>-p</c> argument) right (the name you set above during the Samba
804drivers automagically to the connecting client, avoiding the hassle of 780drivers automagically to the connecting client, avoiding the hassle of
805manually installing printer drivers locally. 781manually installing printer drivers locally.
806</p> 782</p>
807 783
808<p> 784<p>
809There are two sets of printer drivers for this. First, the Adobe PS 785There are two sets of printer drivers for this. First, the Adobe PS drivers
810drivers which can be obtained from <uri 786which can be obtained from <uri
811link="http://www.adobe.com/support/downloads/main.html">Adobe</uri> 787link="http://www.adobe.com/support/downloads/main.html">Adobe</uri> (PostScript
812(PostScript printer drivers). Second, there are the CUPS PS drivers, 788printer drivers). Second, there are the CUPS PS drivers, to be obtained <uri
813to be obtained from <uri link="http://www.cups.org/software.php">the 789link="http://dev.gentoo.org/~nightmorph/misc/cups-samba-5.0rc2.tar.gz">here</uri>.
814CUPS homepage</uri> and selecting "CUPS Driver for Windows" from the 790There doesn't seem to be a difference between the functionality of the two, but
815pull down menu. There doesn't seem to be a difference between the 791the Adobe PS drivers need to be extracted on a Windows System since it's a
816functionality of the two, but the Adobe PS drivers need to be extracted 792Windows binary. Also the whole procedure of finding and copying the correct
817on a Windows System since it's a Windows binary. Also the whole procedure 793files is a bit more hassle. The CUPS drivers seem to support some options the
818of finding and copying the correct files is a bit more hassle. The CUPS 794Adobe drivers don't.
819drivers seem to support some options the Adobe drivers don't.
820</p> 795</p>
796<!--
797used to be available at www.cups.org/articles.php?L142+p4, but only 6.0 is
798available. at some point, we should update this for 6.0.
799-->
821 800
822<p> 801<p>
823This HOWTO uses the CUPS drivers for Windows. The downloaded file is 802This HOWTO uses the CUPS drivers for Windows. The downloaded file is
824called <path>cups-samba-5.0rc2.tar.gz</path>. Extract the files 803called <path>cups-samba-5.0rc2.tar.gz</path>. Extract the files
825contained into a directory. 804contained into a directory.
837<path>cups5.hlp</path>, <path>cupsdrvr5.dll</path> and 816<path>cups5.hlp</path>, <path>cupsdrvr5.dll</path> and
838<path>cupsui5.dll</path>. These are the actual driver files. 817<path>cupsui5.dll</path>. These are the actual driver files.
839</p> 818</p>
840 819
841<warn> 820<warn>
842The script <c>cups-samba.install</c> may not work for all *nixes (ie FreeBSD) 821The script <c>cups-samba.install</c> may not work for all *nixes (i.e. FreeBSD)
843because almost everything which is not part of the base system is 822because almost everything which is not part of the base system is
844installed somewhere under the prefix <path>/usr/local/</path>. This 823installed somewhere under the prefix <path>/usr/local/</path>. This
845seems not to be the case for most things you install under GNU/Linux. 824seems not to be the case for most things you install under GNU/Linux.
846However, if your CUPS installation is somewhere other than 825However, if your CUPS installation is somewhere other than
847<path>/usr/share/cups/</path> see the example below. 826<path>/usr/share/cups/</path> see the example below.
858# <i>tar -xf cups-samba.ss</i> 837# <i>tar -xf cups-samba.ss</i>
859<comment>(This extracts the files to usr/share/cups/drivers under the CURRENT WORKING DIRECTORY)</comment> 838<comment>(This extracts the files to usr/share/cups/drivers under the CURRENT WORKING DIRECTORY)</comment>
860# <i>cd usr/share/cups/drivers</i> 839# <i>cd usr/share/cups/drivers</i>
861<comment>(no leading / !)</comment> 840<comment>(no leading / !)</comment>
862# <i>cp cups* /usr/local/share/cups/drivers</i> 841# <i>cp cups* /usr/local/share/cups/drivers</i>
842# <i>/etc/init.d/cupsd restart</i>
863</pre> 843</pre>
864 844
865<p> 845<p>
866Now we'll use the script <c>cupsaddsmb</c> provided by the CUPS 846Now we'll use the script <c>cupsaddsmb</c> provided by the CUPS distribution.
867distribution. It's man page is an interesting read. 847Its man page is an interesting read.
868</p> 848</p>
869 849
870<pre caption="Run cupsaddsmb"> 850<pre caption="Run cupsaddsmb">
871# <i>cupsaddsmb -H PrintServer -U root -h PrintServer -v HPDeskJet930C</i> 851# <i>cupsaddsmb -H PrintServer -U root -h PrintServer -v HPDeskJet930C</i>
872<comment>(Instead of HPDeskJet930C you could also specify "-a", which will 852<comment>(Instead of HPDeskJet930C you could also specify "-a", which will
873"export all known printers".)</comment> 853"export all known printers".)</comment>
874# <i>cupsaddsmb -H PrintServer -U root -h PrintServer -a</i> 854# <i>cupsaddsmb -H PrintServer -U root -h PrintServer -a</i>
875</pre> 855</pre>
876 856
877<warn> 857<warn>
878The execution of this command often causes the most trouble. 858The execution of this command often causes the most trouble. Read through the
879Reading through the <uri
880link="http://forums.gentoo.org/viewtopic.php?t=110931">posts in this 859<uri link="http://forums.gentoo.org/viewtopic.php?t=110931">posts in this
881thread</uri>. 860thread</uri> for some troubleshooting tips.
882</warn> 861</warn>
883 862
884<p> 863<p>
885Here are common errors that may happen: 864Here are common errors that may happen:
886</p> 865</p>
1144troubleshooting your installation: 1123troubleshooting your installation:
1145</p> 1124</p>
1146 1125
1147<ul> 1126<ul>
1148 <li><uri link="http://www.cups.org/">CUPS Homepage</uri></li> 1127 <li><uri link="http://www.cups.org/">CUPS Homepage</uri></li>
1128 <li>
1149 <li><uri link="http://www.samba.org/">Samba Homepage</uri></li> 1129 <uri link="http://www.samba.org/">Samba Homepage</uri>, especially the <uri
1130 link="http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/CUPS-printing.html">chapter
1131 on Samba/CUPS configuration</uri>
1132 </li>
1150 <li><uri link="http://linuxprinting.org/">LinuxPrinting dot Org</uri></li> 1133 <li><uri link="http://linuxprinting.org/">LinuxPrinting dot Org</uri></li>
1151 <li> 1134 <li>
1152 <uri link="http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/">Kurt 1135 <uri link="http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/">Kurt
1153 Pfeifle's Samba Print HOWTO</uri> ( 1136 Pfeifle's Samba Print HOWTO</uri> (
1154 This HOWTO really covers <e>ANYTHING</e> and <e>EVERYTHING</e> 1137 This HOWTO really covers <e>ANYTHING</e> and <e>EVERYTHING</e>

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.20