/[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.6 Revision 1.14
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.6 2004/06/22 15:34:19 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/quick-samba-howto.xml,v 1.14 2004/12/21 18:09:59 neysx 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="quick-samba-howto.xml">
5<title>Gentoo Samba3/CUPS/Clam AV HOWTO</title> 5<title>Gentoo Samba3/CUPS/Clam AV 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>
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.4</version> 23<version>1.10</version>
24<date>June 22, 2004</date> 24<date>2004-12-21</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>
255 </ti> 255 </ti>
256</tr> 256</tr>
257<tr> 257<tr>
258 <th><b>readline</b></th> 258 <th><b>readline</b></th>
259 <ti> 259 <ti>
260 Link Samba again libreadline. This is highly recommended and should 260 Link Samba against libreadline. This is highly recommended and should
261 probably not be disabled 261 probably not be disabled
262 </ti> 262 </ti>
263</tr> 263</tr>
264<tr> 264<tr>
265 <th><b>python</b></th> 265 <th><b>python</b></th>
445guest ok = yes 445guest ok = yes
446<comment># We now will implement the on access virus scanner. 446<comment># We now will implement the on access virus scanner.
447# NOTE: By putting this in our [Global] section, we enable 447# NOTE: By putting this in our [Global] section, we enable
448# scanning of ALL shares, you could optionally move 448# scanning of ALL shares, you could optionally move
449# 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>
450vfs object = /usr/lib/samba/vfs/vscan-clamav.so 456vfs object = /usr/lib/samba/vfs/vscan-clamav.so
451vfs options = config-file = /etc/samba/vscan-clamav.conf 457vfs options = config-file = /etc/samba/vscan-clamav.conf
452 458
453<comment># Now we setup our print drivers information!</comment> 459<comment># Now we setup our print drivers information!</comment>
454[print$] 460[print$]
455comment = Printer Drivers 461comment = Printer Drivers
456path = /etc/samba/printer <comment># this path holds the driver structure</comment> 462path = /etc/samba/printer <comment># this path holds the driver structure</comment>
457guest ok = no 463guest ok = yes
458browseable = yes 464browseable = yes
459read only = yes 465read only = yes
460<comment># Modify this to "username,root" if you don't want root to 466<comment># Modify this to "username,root" if you don't want root to
461# be the only printer admin)</comment> 467# be the only printer admin)</comment>
462write list = <i>root</i> 468write list = <i>root</i>
475 481
476<comment># Now we setup our printers share. This should be 482<comment># Now we setup our printers share. This should be
477# browseable, printable, public.</comment> 483# browseable, printable, public.</comment>
478[printers] 484[printers]
479comment = All Printers 485comment = All Printers
480browseable = yes 486browseable = no
481printable = yes 487printable = yes
488writable = no
482public = yes 489public = yes
483guest ok = yes 490guest ok = yes
484path = /var/spool/samba 491path = /var/spool/samba
485<comment># Modify this to "username,root" if you don't want root to 492<comment># Modify this to "username,root" if you don't want root to
486# be the only printer admin)</comment> 493# be the only printer admin)</comment>
537<p> 544<p>
538The Samba passwords need not be the same as the system passwords 545The Samba passwords need not be the same as the system passwords
539in <path>/etc/passwd</path>. 546in <path>/etc/passwd</path>.
540</p> 547</p>
541 548
549<p>
550You will also need to update <path>/etc/nsswitch.conf</path> so that Windows
551systems can be found easily using NetBIOS:
552</p>
553
554<pre caption="Editing /etc/nsswitch.conf">
555# <i>nano -w /etc/nsswitch.conf</i>
556<comment>(Edit the hosts: line)</comment>
557hosts: files dns <i>wins</i>
558</pre>
559
542</body> 560</body>
543</section> 561</section>
544<section> 562<section>
545<title>Configuring Clam AV</title> 563<title>Configuring Clam AV</title>
546<body> 564<body>
680<comment>(The following line is found near the end of the file. Uncomment it)</comment> 698<comment>(The following line is found near the end of the file. Uncomment it)</comment>
681application/octet-stream application/vnd.cups-raw 0 699application/octet-stream application/vnd.cups-raw 0
682</pre> 700</pre>
683 701
684<p> 702<p>
685Edit <path>/etc/cups/mime.convs</path> to uncomment some lines. 703Edit <path>/etc/cups/mime.types</path> to uncomment some lines.
686</p> 704</p>
687 705
688<pre caption="/etc/cups/mime.types"> 706<pre caption="/etc/cups/mime.types">
689<comment>(The following line is found near the end of the file. Uncomment it)</comment> 707<comment>(The following line is found near the end of the file. Uncomment it)</comment>
690application/octet-stream 708application/octet-stream
695</p> 713</p>
696 714
697<pre caption="Setting up the CUPS service" > 715<pre caption="Setting up the CUPS service" >
698<comment>(To start CUPS on boot)</comment> 716<comment>(To start CUPS on boot)</comment>
699# <i>rc-update add cupsd default</i> 717# <i>rc-update add cupsd default</i>
700<comment>(To start CUPS if it isn't started)</comment> 718<comment>(To start or restart CUPS now)</comment>
701# <i>/etc/init.d/cupsd start</i>
702<comment>(If CUPS is already started we'll need to restart it!)</comment>
703# <i>/etc/init.d/cupsd restart</i> 719# <i>/etc/init.d/cupsd restart</i>
704</pre> 720</pre>
705 721
706</body> 722</body>
707</section> 723</section>
960<section> 976<section>
961<title>Printer configuration of *nix based clients</title> 977<title>Printer configuration of *nix based clients</title>
962<body> 978<body>
963 979
964<p> 980<p>
965Despite the variation or distribution, the only thing needed is CUPS. 981Despite the variation or distribution, the only thing needed is CUPS. Do the
966Do the equivalent on any other UNIX/Linux/BSD client. 982equivalent on any other UNIX/Linux/BSD client.
967</p> 983</p>
968 984
969<pre caption="Configuring a Gentoo system"> 985<pre caption="Configuring a Gentoo system">
970# <i>emerge cups</i> 986# <i>emerge cups</i>
971# <i>/etc/init.d/cupsd start</i> 987# <i>nano -w /etc/cups/client.conf</i>
972# <i>rc-update add cupsd default</i> 988ServerName <i>PrintServer</i> <comment># your printserver name</comment>
973</pre> 989</pre>
974 990
975<p>
976That should be it. Nothing else will be needed. Just point your web
977browser to <c>http://localhost:631</c> on the client and you'll see that
978PrintServer broadcasts all available printers to all CUPS clients.
979</p> 991<p>
980 992That should be it. Nothing else will be needed.
981<p> 993</p>
982To print, use for example 994
983</p> 995<p>
996If you use only one printer, it will be your default printer. If your print
997server manages several printers, your administrator will have defined a default
998printer on the server. If you want to define a different default printer for
999yourself, use the <c>lpoptions</c> command.
1000</p>
1001
1002<pre caption="Setting your default printer">
1003<comment>(List available printers)</comment>
1004# <i>lpstat -a</i>
1005<comment>(Sample output, yours will differ)</comment>
1006HPDeskJet930C accepting requests since Jan 01 00:00
1007laser accepting requests since Jan 01 00:00
1008<comment>(Define HPDeskJet930C as your default printer)</comment>
1009# <i>lpoptions -d HPDeskJet930C</i>
1010</pre>
984 1011
985<pre caption="Printing in *nix"> 1012<pre caption="Printing in *nix">
1013<comment>(Specify the printer to be used)</comment>
986# <i>lpr -pHPDeskJet930C anything.txt</i> 1014# <i>lp -d HPDeskJet930C anything.txt</i>
987# <i>lpr -PHPDeskJet930C foobar.whatever.ps</i> 1015<comment>(Use your default printer)</comment>
988</pre>
989
990<p>
991In order to setup a default printer, you have to edit
992<path>/etc/cups/client.conf</path> and set the directive
993<c>ServerName</c> to your printserver. In the case of this guide that
994would be the following example.
995</p>
996
997<pre caption="/etc/cups/client.conf">
998ServerName PrintServer
999</pre>
1000
1001<p>
1002The following will print <path>foorbar.whatever.ps</path> directly to the print
1003server.
1004</p>
1005
1006<pre caption="Printing to the default printer">
1007$ <i>lpr foobar.whatever.ps</i> 1016# <i>lp foobar.whatever.ps</i>
1008</pre> 1017</pre>
1009 1018
1010<p>
1011Some common observations when setting a default printer in this manner
1012include the following:
1013</p> 1019<p>
1014 1020Just point your web browser to <c>http://printserver:631</c> on the client if
1015<ul> 1021you want to manage your printers and their jobs with a nice web interface.
1016 <li> 1022Replace <c>printserver</c> with the name of the <e>machine</e> that acts as
1017 Setting the <c>ServerName</c> in <path>client.conf</path> seems to 1023your print server, not the name you gave to the cups print server if you used
1018 work well for only one printer, there may be yet another way to 1024different names.
1019 set a client's default remote printer. 1025</p>
1020 </li>
1021 <li>
1022 Also, when accessing <c>http://localhost:631</c> on the client
1023 now, no printers seem to be "found" by the client-CUPS. This is to
1024 be expected when setting <c>ServerName</c> in
1025 <path>client.conf</path>.
1026 </li>
1027</ul>
1028 1026
1029</body> 1027</body>
1030</section> 1028</section>
1031<section> 1029<section>
1032<title>Mounting a Windows or Samba share in GNU/Linux</title> 1030<title>Mounting a Windows or Samba share in GNU/Linux</title>

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20