/[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.29 Revision 1.39
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.29 2007/06/06 23:23:35 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/quick-samba-howto.xml,v 1.39 2007/12/20 19:13:21 swift Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
4<guide link="/doc/en/quick-samba-howto.xml"> 5<guide link="/doc/en/quick-samba-howto.xml">
6
5<title>Gentoo Samba3/CUPS/ClamAV HOWTO</title> 7<title>Gentoo Samba3/CUPS/ClamAV HOWTO</title>
8
6<author title="Author"> 9<author title="Author">
7 <mail link="daff at dword dot org">Andreas "daff" Ntaflos</mail> 10 Andreas "daff" Ntaflos <!--daff at dword dot org-->
8</author> 11</author>
9<author title="Author"> 12<author title="Author">
10 <mail link="joshua@sungentoo.homeunix.com">Joshua Preston</mail> 13 <mail link="joshua@sungentoo.homeunix.com">Joshua Preston</mail>
14</author>
15<author title="Editor">
16 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
11</author> 17</author>
12 18
13<abstract> 19<abstract>
14Setup, install and configure a Samba Server under Gentoo that shares files, 20Setup, install and configure a Samba Server under Gentoo that shares files,
15printers without the need to install drivers and provides automatic virus 21printers without the need to install drivers and provides automatic virus
16scanning. 22scanning.
17</abstract> 23</abstract>
18 24
19<!-- The content of this document is licensed under the CC-BY-SA license --> 25<!-- The content of this document is licensed under the CC-BY-SA license -->
20<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> 26<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
21<license/> 27<license/>
22 28
23<version>1.17</version> 29<version>1.24</version>
24<date>2007-06-06</date> 30<date>2007-12-20</date>
25 31
26<chapter> 32<chapter>
27<title>Introduction to this HOWTO</title> 33<title>Introduction to this HOWTO</title>
28<section> 34<section>
29<title>Purpose</title> 35<title>Purpose</title>
64There are a few topics that will be mentioned, but are out of the scope of this 70There are a few topics that will be mentioned, but are out of the scope of this
65HOWTO. These will be noted as they are presented. 71HOWTO. These will be noted as they are presented.
66</p> 72</p>
67 73
68<p> 74<p>
69This HOWTO is based on a compilation and merge of an excellent HOWTO provided in 75This HOWTO is based on a compilation and merge of an excellent HOWTO provided
70the <uri link="http://forums.gentoo.org">Gentoo forums</uri> by Andreas "daff" 76in the <uri link="http://forums.gentoo.org">Gentoo forums</uri> by Andreas
71Ntaflos and the collected knowledge of Joshua Preston. The link to this 77"daff" Ntaflos and the collected knowledge of Joshua Preston. The link to this
72discussion is provided below for your reference: 78discussion is provided below for your reference:
73</p> 79</p>
74 80
75<ul> 81<ul>
76 <li> 82 <li>
77 <uri link="http://forums.gentoo.org/viewtopic.php?t=110931">HOWTO 83 <uri link="http://forums.gentoo.org/viewtopic.php?t=110931">HOWTO
78 CUPS+Samba: printing from Windows &amp; Linux</uri> 84 CUPS+Samba: printing from Windows &amp; Linux</uri>
79 </li> 85 </li>
80</ul> 86</ul>
81 87
82</body> 88</body>
152 </li> 158 </li>
153</ul> 159</ul>
154 160
155<p> 161<p>
156The main package we use here is net-fs/samba, however, you will need a kernel 162The main package we use here is net-fs/samba, however, you will need a kernel
157with smbfs support enabled in order to mount a samba or windows share from 163with cifs support enabled in order to mount a samba or windows share from
158another computer. CUPS will be emerged if it is not already. 164another computer. CUPS will be emerged if it is not already.
159app-antivirus/clamav will be used also, but others should be easily adapted to 165app-antivirus/clamav will be used also, but others should be easily adapted to
160work with Samba. Gentoo's samba ebuild supports all kinds of virus scanning 166work with Samba. Gentoo's samba ebuild supports all kinds of virus scanning
161technologies, such as Sophos, FProt, Fsav, Trend, Icap, Nai, ... 167technologies, such as Sophos, FProt, Fsav, Trend, Icap, Nai, ...
162</p> 168</p>
175Before emerging anything, take a look at some of the various USE flags available 181Before emerging anything, take a look at some of the various USE flags available
176to Samba. 182to Samba.
177</p> 183</p>
178 184
179<pre caption="Samba uses the following USE Variables:"> 185<pre caption="Samba uses the following USE Variables:">
180kerberos acl cups ldap pam readline python oav 186kerberos acl cups ldap pam readline python oav winbind
181</pre> 187</pre>
182 188
183<p> 189<p>
184Depending on the network topology and the specific requirements of the server, 190Depending on the network topology and the specific requirements of the server,
185the USE flags outlined below will define what to include or exclude from the 191the USE flags outlined below will define what to include or exclude from the
192 <th>Description</th> 198 <th>Description</th>
193</tr> 199</tr>
194<tr> 200<tr>
195 <th><b>kerberos</b></th> 201 <th><b>kerberos</b></th>
196 <ti> 202 <ti>
197 Include support for Kerberos. The server will need this if it is 203 Include support for Kerberos. The server will need this if it is intended
198 intended to join an existing domain or Active Directory. See the note 204 to join an existing domain or Active Directory. See the note below for more
199 below for more information. 205 information.
200 </ti> 206 </ti>
201</tr> 207</tr>
202<tr> 208<tr>
203 <th><b>acl</b></th> 209 <th><b>acl</b></th>
204 <ti> 210 <ti>
205 Enables Access Control Lists. The ACL support in Samba uses a patched 211 Enables Access Control Lists. The ACL support in Samba uses a patched
206 ext2/ext3, or SGI's XFS in order to function properly as it extends more 212 ext2/ext3, or SGI's XFS in order to function properly as it extends more
207 detailed access to files or directories; much more so than typical *nix 213 detailed access to files or directories; much more so than typical *nix
208 GID/UID schemas. 214 GID/UID schemas.
209 </ti> 215 </ti>
210</tr> 216</tr>
211<tr> 217<tr>
212 <th><b>cups</b></th> 218 <th><b>cups</b></th>
227 </ti> 233 </ti>
228</tr> 234</tr>
229<tr> 235<tr>
230 <th><b>pam</b></th> 236 <th><b>pam</b></th>
231 <ti> 237 <ti>
232 Include support for pluggable authentication modules (PAM). This provides 238 Include support for pluggable authentication modules (PAM). This provides
233 the ability to authenticate users on the Samba Server, which is required if 239 the ability to authenticate users on the Samba Server, which is required if
234 users have to login to your server. The kerberos USE flag is recommended 240 users have to login to your server. The kerberos USE flag is recommended
235 along with this option. 241 along with this option.
236 </ti> 242 </ti>
237</tr> 243</tr>
255 Provides on-access scanning of Samba shares with FRISK F-Prot Daemon, 261 Provides on-access scanning of Samba shares with FRISK F-Prot Daemon,
256 Kaspersky AntiVirus, OpenAntiVirus.org ScannerDaemon, Sophos Sweep (SAVI), 262 Kaspersky AntiVirus, OpenAntiVirus.org ScannerDaemon, Sophos Sweep (SAVI),
257 Symantec CarrierScan, and Trend Micro (VSAPI). 263 Symantec CarrierScan, and Trend Micro (VSAPI).
258 </ti> 264 </ti>
259</tr> 265</tr>
266<tr>
267 <th><b>winbind</b></th>
268 <ti>
269 Winbind allows for a unified logon within a Samba environment. It uses a
270 Unix implementation of Windows RPC calls, PAM and the name service switch
271 (supported by the c library) to enable Windows NT domain users to appear and
272 work as Unix users on a Unix system.
273 </ti>
274</tr>
260</table> 275</table>
261 276
262<p> 277<p>
263A couple of things worth mentioning about the USE flags and different 278A couple of things worth mentioning about the USE flags and different
264Samba functions include: 279Samba functions include:
265</p> 280</p>
266 281
267<ul> 282<ul>
268 <li> 283 <li>
269 ACLs on ext2/3 are implemented through extended attributes (EAs). EA and 284 ACLs on ext2/3 are implemented through extended attributes (EAs). EA and
270 ACL kernel options for ext2 and/or ext3 will need to be enabled 285 ACL kernel options for ext2 and/or ext3 will need to be enabled (depending
271 (depending on which file system is being used - both can be enabled). 286 on which file system is being used - both can be enabled).
272 </li> 287 </li>
273 <li> 288 <li>
274 While Active Directory, ACL, and PDC functions are out of the intended 289 While Active Directory, ACL, and PDC functions are out of the intended
275 scope of this HOWTO, you may find these links as helpful to your cause: 290 scope of this HOWTO, you may find these links as helpful to your cause:
276 <ul> 291 <ul>
292 307
293<p> 308<p>
294First of all: be sure that all your hostnames resolve correctly. Either have a 309First of all: be sure that all your hostnames resolve correctly. Either have a
295working domain name system running on your network or appropriate entries in 310working domain name system running on your network or appropriate entries in
296your <path>/etc/hosts</path> file. <c>cupsaddsmb</c> often borks if hostnames 311your <path>/etc/hosts</path> file. <c>cupsaddsmb</c> often borks if hostnames
297don't point to the correct machines. 312don't point to the correct machines.
298</p> 313</p>
299 314
300<p> 315<p>
301Hopefully now you can make an assessment of what you'll actually need in order 316Hopefully now you can make an assessment of what you'll actually need in order
302to use Samba with your particular setup. The setup used for this HOWTO is: 317to use Samba with your particular setup. The setup used for this HOWTO is:
317<pre caption="Emerge Samba"> 332<pre caption="Emerge Samba">
318# <i>echo "net-fs/samba oav readline cups pam" &gt;&gt; /etc/portage/package.use</i> 333# <i>echo "net-fs/samba oav readline cups pam" &gt;&gt; /etc/portage/package.use</i>
319# <i>emerge net-fs/samba</i> 334# <i>emerge net-fs/samba</i>
320</pre> 335</pre>
321 336
322<note>
323The following arches will need to add <e>~</e> to their <e>KEYWORDS</e>: x86,
324ppc, sparc, hppa, ia64 and alpha
325</note>
326
327<p> 337<p>
328This will emerge Samba and CUPS (if CUPS is not already emerged). 338This will emerge Samba and CUPS (if CUPS is not already emerged).
329</p> 339</p>
330 340
331</body> 341</body>
377<section> 387<section>
378<title>Configuring Samba</title> 388<title>Configuring Samba</title>
379<body> 389<body>
380 390
381<p> 391<p>
382The main Samba configuration file is <path>/etc/samba/smb.conf</path>. It is 392The main Samba configuration file is <path>/etc/samba/smb.conf</path>. It is
383divided in sections indicated by [sectionname]. Comments are either 393divided in sections indicated by [sectionname]. Comments are either
384# or ;. A sample <path>smb.conf</path> is included below with comments and 394# or ;. A sample <path>smb.conf</path> is included below with comments and
385suggestions for modifications. If more details are required, see the man page 395suggestions for modifications. If more details are required, see the man page
386for <path>smb.conf</path>, the installed <path>smb.conf.example</path>, the 396for <path>smb.conf</path>, the installed <path>smb.conf.example</path>, the
387Samba Web site or any of the numerous Samba books available. 397Samba Web site or any of the numerous Samba books available.
388</p> 398</p>
389 399
390<pre caption="A Sample /etc/samba/smb.conf"> 400<pre caption="A Sample /etc/samba/smb.conf">
391[global] 401[global]
392<comment># Replace MYWORKGROUPNAME with your workgroup/domain</comment> 402<comment># Replace MYWORKGROUPNAME with your workgroup/domain</comment>
416hosts deny = 0.0.0.0/0 426hosts deny = 0.0.0.0/0
417<comment># Other options for this are USER, DOMAIN, ADS, and SERVER 427<comment># Other options for this are USER, DOMAIN, ADS, and SERVER
418# The default is user</comment> 428# The default is user</comment>
419security = share 429security = share
420<comment># No passwords, so we're going to use a guest account!</comment> 430<comment># No passwords, so we're going to use a guest account!</comment>
421guest account = samba
422guest ok = yes 431guest ok = yes
423<comment># We now will implement the on access virus scanner. 432<comment># We now will implement the on access virus scanner.
424# NOTE: By putting this in our [Global] section, we enable 433# NOTE: By putting this in our [Global] section, we enable
425# scanning of ALL shares, you could optionally move 434# scanning of ALL shares, you could optionally move
426# these to a specific share and only scan it.</comment> 435# these to a specific share and only scan it.</comment>
450guest ok = yes 459guest ok = yes
451<comment># Modify this to "username,root" if you don't want root to 460<comment># Modify this to "username,root" if you don't want root to
452# be the only printer admin)</comment> 461# be the only printer admin)</comment>
453printer admin = <i>root</i> 462printer admin = <i>root</i>
454 463
455<comment># Now we setup our printers share. This should be 464<comment># Now we setup our printers share. This should be
456# browseable, printable, public.</comment> 465# browseable, printable, public.</comment>
457[printers] 466[printers]
458comment = All Printers 467comment = All Printers
459browseable = no 468browseable = no
460printable = yes 469printable = yes
461writable = no 470writable = no
462public = yes 471public = yes
463guest ok = yes 472guest ok = yes
464path = /var/spool/samba 473path = /var/spool/samba
465<comment># Modify this to "username,root" if you don't want root to 474<comment># Modify this to "username,root" if you don't want root to
466# be the only printer admin)</comment> 475# be the only printer admin)</comment>
467printer admin = <i>root</i> 476printer admin = <i>root</i>
510to allow users to connect to the printer. Users must exist in the system's 519to allow users to connect to the printer. Users must exist in the system's
511<path>/etc/passwd</path> file. 520<path>/etc/passwd</path> file.
512</p> 521</p>
513 522
514<pre caption="Creating the users"> 523<pre caption="Creating the users">
515# <i>smbpasswd -a root</i> 524# <i>smbpasswd -a root</i>
516 525
517<comment>(If another user is to be a printer admin)</comment> 526<comment>(If another user is to be a printer admin)</comment>
518# <i>smbpasswd -a username</i> 527# <i>smbpasswd -a username</i>
519</pre> 528</pre>
520 529
521<p> 530<p>
522The Samba passwords need not be the same as the system passwords 531The Samba passwords need not be the same as the system passwords
523in <path>/etc/passwd</path>. 532in <path>/etc/passwd</path>.
524</p> 533</p>
525 534
526<p> 535<p>
527You will also need to update <path>/etc/nsswitch.conf</path> so that Windows 536You will also need to update <path>/etc/nsswitch.conf</path> so that Windows
653ServerAdmin <i>root@PrintServer</i> <comment># the person for printer-related hate-mail, e.g. you</comment> 662ServerAdmin <i>root@PrintServer</i> <comment># the person for printer-related hate-mail, e.g. you</comment>
654 663
655AccessLog /var/log/cups/access_log <comment># probably doesn't need changing</comment> 664AccessLog /var/log/cups/access_log <comment># probably doesn't need changing</comment>
656ErrorLog /var/log/cups/error_log <comment># doesn't really need changing either</comment> 665ErrorLog /var/log/cups/error_log <comment># doesn't really need changing either</comment>
657 666
658LogLevel debug <comment># only while isntalling and testing, should later be 667LogLevel debug <comment># only while installing and testing, should later be
659 # changed to 'info'</comment> 668 # changed to 'info'</comment>
660 669
661MaxClients 100 <comment># I've had to set this to 1000000000 or so because some time back, 670MaxClients 100 <comment># I've had to set this to 1000000000 or so because some time back,
662 # there seemed to be a bug in CUPS' controlling of the web interface, 671 # there seemed to be a bug in CUPS' controlling of the web interface,
663 # making CUPS think a denial of service attack was in progress when 672 # making CUPS think a denial of service attack was in progress when
664 # I tried to configure a printer with the web interface. weird.</comment> 673 # I tried to configure a printer with the web interface. weird.</comment>
665 674
666BrowseAddress @IF(<i>eth0</i>) <comment># Change this to your internal net interface</comment> 675BrowseAddress @IF(<i>eth0</i>) <comment># Change this to your internal net interface</comment>
667 676
668&lt;Location /&gt; 677&lt;Location /&gt;
669Order Deny,Allow 678Order Deny,Allow
670Deny From All 679Deny From All
671Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network 680Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network
675 684
676&lt;Location /admin&gt; 685&lt;Location /admin&gt;
677AuthType Basic 686AuthType Basic
678AuthClass System 687AuthClass System
679Allow From <i>192.168.1.*</i> <comment># same as above, allow any host on the 688Allow From <i>192.168.1.*</i> <comment># same as above, allow any host on the
680 # 192.168.1.0 network to connect and do 689 # 192.168.1.0 network to connect and do
681 # administrative tasks after authenticating</comment> 690 # administrative tasks after authenticating</comment>
682Order Deny,Allow 691Order Deny,Allow
683Deny From All 692Deny From All
684&lt;/Location&gt; 693&lt;/Location&gt;
685</pre> 694</pre>
686 695
687<p> 696<p>
688Edit <path>/etc/cups/mime.convs</path> to uncomment some lines. 697Edit <path>/etc/cups/mime.convs</path> to uncomment some lines. The changes to
689The changes to <path>mime.convs</path> and <path>mime.types</path> are 698<path>mime.convs</path> and <path>mime.types</path> are needed to make CUPS
690needed to make CUPS print Microsoft Office document files. 699print Microsoft Office document files.
691</p> 700</p>
692 701
693<pre caption="/etc/cups/mime.convs"> 702<pre caption="/etc/cups/mime.convs">
694<comment>(The following line is found near the end of the file. Uncomment it)</comment> 703<comment>(The following line is found near the end of the file. Uncomment it)</comment>
695application/octet-stream application/vnd.cups-raw 0 704application/octet-stream application/vnd.cups-raw 0
696</pre> 705</pre>
697 706
698<p> 707<p>
699Edit <path>/etc/cups/mime.types</path> to uncomment some lines. 708Edit <path>/etc/cups/mime.types</path> to uncomment some lines.
700</p> 709</p>
701 710
702<pre caption="/etc/cups/mime.types"> 711<pre caption="/etc/cups/mime.types">
703<comment>(The following line is found near the end of the file. Uncomment it)</comment> 712<comment>(The following line is found near the end of the file. Uncomment it)</comment>
704application/octet-stream 713application/octet-stream
705</pre> 714</pre>
706 715
707<p> 716<p>
708CUPS needs to be started on boot, and started immediately. 717CUPS needs to be started on boot, and started immediately.
709</p> 718</p>
710 719
711<pre caption="Setting up the CUPS service" > 720<pre caption="Setting up the CUPS service" >
712<comment>(To start CUPS on boot)</comment> 721<comment>(To start CUPS on boot)</comment>
713# <i>rc-update add cupsd default</i> 722# <i>rc-update add cupsd default</i>
764<section> 773<section>
765<title>Installing the Windows printer drivers</title> 774<title>Installing the Windows printer drivers</title>
766<body> 775<body>
767 776
768<p> 777<p>
769Now that the printer should be working it is time to install the drivers for the 778Now that the printer should be working it is time to install the drivers for
770Windows clients to work. Samba 2.2 introduced this functionality. Browsing to 779the Windows clients to work. Samba 2.2 introduced this functionality. Browsing
771the print server in the Network Neighbourhood, right-clicking on the 780to the print server in the Network Neighbourhood, right-clicking on the
772printershare and selecting "connect" downloads the appropriate drivers 781printershare and selecting "connect" downloads the appropriate drivers
773automagically to the connecting client, avoiding the hassle of manually 782automagically to the connecting client, avoiding the hassle of manually
774installing printer drivers locally. 783installing printer drivers locally.
775</p> 784</p>
776 785
777<p> 786<p>
778There are two sets of printer drivers for this. First, the Adobe PS drivers 787There are two sets of printer drivers for this. First, the Adobe PS drivers
779which can be obtained from <uri 788which can be obtained from <uri
780link="http://www.adobe.com/support/downloads/main.html">Adobe</uri> (PostScript 789link="http://www.adobe.com/support/downloads/main.html">Adobe</uri> (PostScript
781printer drivers). Second, there are the CUPS PS drivers, to be obtained <uri 790printer drivers). Second, there are the CUPS PS drivers, to be obtained by
782link="http://dev.gentoo.org/~nightmorph/misc/cups-samba-5.0rc2.tar.gz">here</uri>. 791emerging <c>net-print/cups-windows</c>. Note that it may still be marked ~arch,
792so you may need to add it to <path>/etc/portage/package.keywords</path>. There
783There doesn't seem to be a difference between the functionality of the two, but 793doesn't seem to be a difference between the functionality of the two, but the
784the Adobe PS drivers need to be extracted on a Windows System since it's a 794Adobe PS drivers need to be extracted on a Windows System since it's a Windows
785Windows binary. Also the whole procedure of finding and copying the correct 795binary. Also the whole procedure of finding and copying the correct files is a
786files is a bit more hassle. The CUPS drivers seem to support some options the 796bit more hassle. The CUPS drivers support some options the Adobe drivers
787Adobe drivers don't. 797don't.
788</p>
789<!--
790used to be available at www.cups.org/articles.php?L142+p4, but only 6.0 is
791available. at some point, we should update this for 6.0.
792-->
793
794<p> 798</p>
795This HOWTO uses the CUPS drivers for Windows. The downloaded file is 799
796called <path>cups-samba-5.0rc2.tar.gz</path>. Extract the files
797contained into a directory.
798</p> 800<p>
799 801This HOWTO uses the CUPS drivers for Windows. Install them as shown:
800<pre caption="Extract the drivers and run the install">
801# <i>tar -xzf cups-samba-5.0rc2.tar.gz</i>
802# <i>cd cups-samba-5.0rc2</i>
803<comment>(Only use this script if CUPS resides in /usr/share/cups)</comment>
804# <i>./cups-samba.install</i>
805</pre>
806
807<p> 802</p>
808<path>cups-samba.ss</path> is a TAR archive containing three files:
809<path>cups5.hlp</path>, <path>cupsdrvr5.dll</path> and
810<path>cupsui5.dll</path>. These are the actual driver files.
811</p>
812 803
813<warn>
814The script <c>cups-samba.install</c> may not work for all *nixes (i.e. FreeBSD)
815because almost everything which is not part of the base system is installed
816somewhere under the prefix <path>/usr/local/</path>. This seems not to be the
817case for most things you install under GNU/Linux. However, if your CUPS
818installation is somewhere other than <path>/usr/share/cups/</path> see the
819example below.
820</warn>
821
822<p>
823Suppose your CUPS installation resides under
824<path>/usr/local/share/cups/</path>, and you want to install the drivers there.
825Do the following:
826</p>
827
828<pre caption="Manually installing the drivers"> 804<pre caption="Install the drivers">
829# <i>cd /path/you/extracted/the/CUPS-driver/tarball/into</i> 805# <i>emerge -av cups-windows</i>
830# <i>tar -xf cups-samba.ss</i>
831<comment>(This extracts the files to usr/share/cups/drivers under the CURRENT WORKING DIRECTORY)</comment>
832# <i>cd usr/share/cups/drivers</i>
833<comment>(no leading / !)</comment>
834# <i>cp cups* /usr/local/share/cups/drivers</i>
835# <i>/etc/init.d/cupsd restart</i>
836</pre> 806</pre>
837 807
838<p> 808<p>
839Now we'll use the script <c>cupsaddsmb</c> provided by the CUPS distribution. 809Now we'll use the script <c>cupsaddsmb</c> provided by the CUPS distribution.
840Its man page is an interesting read. 810Be sure to read its manpage (<c>man cupsaddsmb</c>), as it will tell you which
811Windows drivers you'll need to copy to the proper CUPS directory. Once you've
812copied the drivers, restart CUPS by running <c>/etc/init.d/cupsd restart</c>.
813Next, run <c>cupsaddsmb</c> as shown:
841</p> 814</p>
842 815
843<pre caption="Run cupsaddsmb"> 816<pre caption="Run cupsaddsmb">
844# <i>cupsaddsmb -H PrintServer -U root -h PrintServer -v HPDeskJet930C</i> 817# <i>cupsaddsmb -H PrintServer -U root -h PrintServer -v HPDeskJet930C</i>
845<comment>(Instead of HPDeskJet930C you could also specify "-a", which will 818<comment>(Instead of HPDeskJet930C you could also specify "-a", which will
1025</section> 998</section>
1026<section> 999<section>
1027<title>Mounting a Windows or Samba share in GNU/Linux</title> 1000<title>Mounting a Windows or Samba share in GNU/Linux</title>
1028<body> 1001<body>
1029 1002
1003<note>
1004Don't forget to install <c>net-fs/mount-cifs</c> or <c>net-fs/samba</c> on the
1005client(s) that will be accessing the shares.
1006</note>
1007
1030<p> 1008<p>
1031Now is time to configure our kernel to support smbfs. Since I'm assumming we've 1009Now is time to configure our kernel to support cifs. Since I'm assuming
1032all compiled at least one kernel, we'll need to make sure we have all the right 1010we've all compiled at least one kernel, we'll need to make sure we have all the
1033options selected in our kernel. For simplicity's sake, make it a module for ease 1011right options selected in our kernel. For simplicity's sake, make it a module
1034of use. It is the author's opinion that kernel modules are a good thing and 1012for ease of use. It is the author's opinion that kernel modules are a good thing
1035should be used whenever possible. 1013and should be used whenever possible.
1036</p>
1037
1038<pre caption="Relevant kernel options" >
1039CONFIG_SMB_FS=m
1040CONFIG_SMB_UNIX=y
1041</pre>
1042
1043<p> 1014</p>
1015
1016<pre caption="Kernel support" >
1017CONFIG_CIFS=m
1018</pre>
1019
1020<p>
1044Then make the module/install it; insert them with: 1021Then make the module/install it; insert it with:
1045</p> 1022</p>
1046 1023
1047<pre caption="Loading the kernel module"> 1024<pre caption="Loading the kernel module">
1048# <i>modprobe smbfs</i> 1025# <i>modprobe cifs</i>
1049</pre> 1026</pre>
1050 1027
1051<p> 1028<p>
1052Once the module is loaded, mounting a Windows or Samba share is possible. Use 1029Once the module is loaded, mounting a Windows or Samba share is possible. Use
1053<c>mount</c> to accomplish this, as detailed below: 1030<c>mount</c> to accomplish this, as detailed below:
1054</p> 1031</p>
1055 1032
1056<pre caption="Mounting a Windows/Samba share"> 1033<pre caption="Mounting a Windows/Samba share">
1057<comment>(The syntax for mounting a Windows/Samba share is: 1034<comment>(The syntax for mounting a Windows/Samba share is:
1058 mount -t smbfs [-o username=xxx,password=xxx] //server/share /mnt/point 1035 mount -t cifs [-o username=xxx,password=xxx] //server/share /mnt/point
1059If we are not using passwords or a password is not needed)</comment> 1036If we are not using passwords or a password is not needed)</comment>
1060 1037
1061# <i>mount -t smbfs //PrintServer/public /mnt/public</i> 1038# <i>mount -t cifs //PrintServer/public /mnt/public</i>
1062 1039
1063<comment>(If a password is needed)</comment> 1040<comment>(If a password is needed)</comment>
1064# <i>mount -t smbfs -o username=USERNAME,password=PASSWORD //PrintServer/public /mnt/public</i> 1041# <i>mount -t cifs -o username=USERNAME,password=PASSWORD //PrintServer/public /mnt/public</i>
1065</pre> 1042</pre>
1066 1043
1067<p> 1044<p>
1068After you mount the share, you would access it as if it were a local drive. 1045After you mount the share, you would access it as if it were a local drive.
1069</p> 1046</p>

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.20