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.24 2006/03/11 16:15:34 swift Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/quick-samba-howto.xml,v 1.25 2006/06/19 12:08:14 flammie Exp $ --> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
4 | <guide link="/doc/en/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"> |
10 | <mail link="joshua@sungentoo.homeunix.com">Joshua Preston</mail> |
10 | <mail link="joshua@sungentoo.homeunix.com">Joshua Preston</mail> |
11 | </author> |
11 | </author> |
12 | |
12 | |
13 | <abstract> |
13 | <abstract> |
14 | Setup, install and configure a Samba Server under Gentoo that shares |
14 | Setup, install and configure a Samba Server under Gentoo that shares |
15 | files, printers without the need to install drivers and provides |
15 | files, printers without the need to install drivers and provides |
16 | automatic virus scanning. |
16 | automatic virus scanning. |
17 | </abstract> |
17 | </abstract> |
… | |
… | |
668 | </body> |
668 | </body> |
669 | </section> |
669 | </section> |
670 | <section> |
670 | <section> |
671 | <title>Configuring CUPS</title> |
671 | <title>Configuring CUPS</title> |
672 | <body> |
672 | <body> |
673 | |
673 | |
674 | <p> |
674 | <p> |
675 | This is a little more complicated. CUPS' main config file is |
675 | This is a little more complicated. CUPS' main config file is |
676 | <path>/etc/cups/cupsd.conf</path>. It's structure is similar to Apache's |
676 | <path>/etc/cups/cupsd.conf</path>. It's structure is similar to Apache's |
677 | <path>httpd.conf</path> file, so many you may find it familiar. Outlined |
677 | <path>httpd.conf</path> file, so many you may find it familiar. Outlined |
678 | in the example are the directives that need to be changed: |
678 | in the example are the directives that need to be changed: |
679 | </p> |
679 | </p> |
680 | |
680 | |
681 | <pre caption="/etc/cups/cupsd.conf"> |
681 | <pre caption="/etc/cups/cupsd.conf"> |
682 | ServerName <i>PrintServer</i> <comment># your printserver name</comment> |
682 | ServerName <i>PrintServer</i> <comment># your printserver name</comment> |
683 | ServerAdmin <i>root@PrintServer</i> <comment># the person for printer-related hate-mail, eg you</comment> |
683 | ServerAdmin <i>root@PrintServer</i> <comment># the person for printer-related hate-mail, e.g. you</comment> |
684 | |
684 | |
685 | AccessLog /var/log/cups/access_log <comment># probably doesn't need changing</comment> |
685 | AccessLog /var/log/cups/access_log <comment># probably doesn't need changing</comment> |
686 | ErrorLog /var/log/cups/error_log <comment># doesn't really need changing either</comment> |
686 | ErrorLog /var/log/cups/error_log <comment># doesn't really need changing either</comment> |
687 | |
687 | |
688 | LogLevel debug <comment># only while isntalling and testing, should later be |
688 | LogLevel debug <comment># only while isntalling and testing, should later be |
689 | # changed to 'info'</comment> |
689 | # changed to 'info'</comment> |
690 | |
690 | |
691 | MaxClients 100 <comment># I've had to set this to 1000000000 or so because some time back, |
691 | MaxClients 100 <comment># I've had to set this to 1000000000 or so because some time back, |
692 | # there seemed to be a bug in CUPS' controlling of the web interface, |
692 | # there seemed to be a bug in CUPS' controlling of the web interface, |
693 | # making CUPS think a denial of service attack was in progress when |
693 | # making CUPS think a denial of service attack was in progress when |
694 | # I tried to configure a printer with the web interface. weird.</comment> |
694 | # I tried to configure a printer with the web interface. weird.</comment> |
695 | |
695 | |
696 | BrowseAddress @IF(<i>eth0</i>) <comment># Change this to your internal net interface</comment> |
696 | BrowseAddress @IF(<i>eth0</i>) <comment># Change this to your internal net interface</comment> |
697 | |
697 | |
698 | <Location /> |
698 | <Location /> |
699 | Order Deny,Allow |
699 | Order Deny,Allow |
700 | Deny From All |
700 | Deny From All |
701 | Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network |
701 | Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network |
702 | # eg 192.168.1.* will allow connections from any host on |
702 | # e.g. 192.168.1.* will allow connections from any host on |
703 | # the 192.168.1.0 network. change to whatever suits you</comment> |
703 | # the 192.168.1.0 network. change to whatever suits you</comment> |
704 | </Location> |
704 | </Location> |
705 | |
705 | |
706 | <Location /admin> |
706 | <Location /admin> |
707 | AuthType Basic |
707 | AuthType Basic |
708 | AuthClass System |
708 | AuthClass System |
709 | Allow From <i>192.168.1.*</i> <comment># same as above, allow any host on the |
709 | Allow From <i>192.168.1.*</i> <comment># same as above, allow any host on the |
710 | # 192.168.1.0 network to connect and do |
710 | # 192.168.1.0 network to connect and do |
711 | # administrative tasks after authenticating</comment> |
711 | # administrative tasks after authenticating</comment> |
712 | Order Deny,Allow |
712 | Order Deny,Allow |
713 | Deny From All |
713 | Deny From All |
714 | </Location> |
714 | </Location> |
715 | </pre> |
715 | </pre> |
716 | |
716 | |
717 | <p> |
717 | <p> |
… | |
… | |
743 | # <i>rc-update add cupsd default</i> |
743 | # <i>rc-update add cupsd default</i> |
744 | <comment>(To start or restart CUPS now)</comment> |
744 | <comment>(To start or restart CUPS now)</comment> |
745 | # <i>/etc/init.d/cupsd restart</i> |
745 | # <i>/etc/init.d/cupsd restart</i> |
746 | </pre> |
746 | </pre> |
747 | |
747 | |
748 | </body> |
748 | </body> |
749 | </section> |
749 | </section> |
750 | <section> |
750 | <section> |
751 | <title>Installing a printer for and with CUPS</title> |
751 | <title>Installing a printer for and with CUPS</title> |
752 | <body> |
752 | <body> |
753 | |
753 | |
754 | <p> |
754 | <p> |
755 | First, go to <uri link="http://linuxprinting.org">LinuxPrinting.Org</uri> to |
755 | First, go to <uri link="http://linuxprinting.org">LinuxPrinting.Org</uri> to |
756 | find and download the correct PPD file for your printer and CUPS. To do so, |
756 | find and download the correct PPD file for your printer and CUPS. To do so, |
757 | click the link Printer Listings to the left. Select your printers manufacturer |
757 | click the link Printer Listings to the left. Select your printers manufacturer |
758 | and the model in the pulldown menu, eg HP and DeskJet 930C. Click "Show". On |
758 | and the model in the pulldown menu, e.g. HP and DeskJet 930C. Click "Show". On |
759 | the page coming up click the "recommended driver" link after reading the |
759 | the page coming up click the "recommended driver" link after reading the |
760 | various notes and information. Then fetch the PPD file from the next page, |
760 | various notes and information. Then fetch the PPD file from the next page, |
761 | again after reading the notes and introductions there. You may have to select |
761 | again after reading the notes and introductions there. You may have to select |
762 | your printers manufacturer and model again. Reading the <uri |
762 | your printers manufacturer and model again. Reading the <uri |
763 | link="http://www.linuxprinting.org/cups-doc.html">CUPS quickstart guide</uri> |
763 | link="http://www.linuxprinting.org/cups-doc.html">CUPS quickstart guide</uri> |
764 | is also very helpful when working with CUPS. |
764 | is also very helpful when working with CUPS. |
765 | </p> |
765 | </p> |
766 | |
766 | |
767 | <p> |
767 | <p> |
768 | Now you have a PPD file for your printer to work with CUPS. Place it in |
768 | Now you have a PPD file for your printer to work with CUPS. Place it in |
769 | <path>/usr/share/cups/model</path>. The PPD for the HP DeskJet 930C was |
769 | <path>/usr/share/cups/model</path>. The PPD for the HP DeskJet 930C was |
770 | named <path>HP-DeskJet_930C-hpijs.ppd</path>. You should now install the printer. |
770 | named <path>HP-DeskJet_930C-hpijs.ppd</path>. You should now install the printer. |
771 | This can be done via the CUPS web interface or via command line. The web |
771 | This can be done via the CUPS web interface or via command line. The web |
772 | interface is found at <path>http://PrintServer:631</path> once CUPS is running. |
772 | interface is found at <path>http://PrintServer:631</path> once CUPS is running. |
773 | </p> |
773 | </p> |
… | |
… | |
827 | |
827 | |
828 | <pre caption="Extract the drivers and run the install"> |
828 | <pre caption="Extract the drivers and run the install"> |
829 | # <i>tar -xzf cups-samba-5.0rc2.tar.gz</i> |
829 | # <i>tar -xzf cups-samba-5.0rc2.tar.gz</i> |
830 | # <i>cd cups-samba-5.0rc2</i> |
830 | # <i>cd cups-samba-5.0rc2</i> |
831 | <comment>(Only use this script if CUPS resides in /usr/share/cups)</comment> |
831 | <comment>(Only use this script if CUPS resides in /usr/share/cups)</comment> |
832 | # <i>./cups-samba.install</i> |
832 | # <i>./cups-samba.install</i> |
833 | </pre> |
833 | </pre> |
834 | |
834 | |
835 | <p> |
835 | <p> |
836 | <path>cups-samba.ss</path> is a TAR archive containing three files: |
836 | <path>cups-samba.ss</path> is a TAR archive containing three files: |
837 | <path>cups5.hlp</path>, <path>cupsdrvr5.dll</path> and |
837 | <path>cups5.hlp</path>, <path>cupsdrvr5.dll</path> and |
838 | <path>cupsui5.dll</path>. These are the actual driver files. |
838 | <path>cupsui5.dll</path>. These are the actual driver files. |
839 | </p> |
839 | </p> |
840 | |
840 | |
841 | <warn> |
841 | <warn> |
842 | The script <c>cups-samba.install</c> may not work for all *nixes (ie FreeBSD) |
842 | The script <c>cups-samba.install</c> may not work for all *nixes (i.e. FreeBSD) |
843 | because almost everything which is not part of the base system is |
843 | because almost everything which is not part of the base system is |
844 | installed somewhere under the prefix <path>/usr/local/</path>. This |
844 | installed somewhere under the prefix <path>/usr/local/</path>. This |
845 | seems not to be the case for most things you install under GNU/Linux. |
845 | seems not to be the case for most things you install under GNU/Linux. |
846 | However, if your CUPS installation is somewhere other than |
846 | However, if your CUPS installation is somewhere other than |
847 | <path>/usr/share/cups/</path> see the example below. |
847 | <path>/usr/share/cups/</path> see the example below. |
848 | </warn> |
848 | </warn> |
849 | |
849 | |
850 | <p> |
850 | <p> |
851 | Suppose your CUPS installation resides under |
851 | Suppose your CUPS installation resides under |
852 | <path>/usr/local/share/cups/</path>, and you want to install the drivers there. |
852 | <path>/usr/local/share/cups/</path>, and you want to install the drivers there. |
853 | Do the following: |
853 | Do the following: |
854 | </p> |
854 | </p> |
855 | |
855 | |
856 | <pre caption="Manually installing the drivers"> |
856 | <pre caption="Manually installing the drivers"> |
857 | # <i>cd /path/you/extracted/the/CUPS-driver/tarball/into</i> |
857 | # <i>cd /path/you/extracted/the/CUPS-driver/tarball/into</i> |