/[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.36 Revision 1.37
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.36 2007/12/01 11:25:01 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/quick-samba-howto.xml,v 1.37 2007/12/01 11:30:40 neysx Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/quick-samba-howto.xml"> 5<guide link="/doc/en/quick-samba-howto.xml">
6 6
7<title>Gentoo Samba3/CUPS/ClamAV HOWTO</title> 7<title>Gentoo Samba3/CUPS/ClamAV HOWTO</title>
70There 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
71HOWTO. These will be noted as they are presented. 71HOWTO. These will be noted as they are presented.
72</p> 72</p>
73 73
74<p> 74<p>
75This 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
76the <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
77Ntaflos 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
78discussion is provided below for your reference: 78discussion is provided below for your reference:
79</p> 79</p>
80 80
81<ul> 81<ul>
82 <li> 82 <li>
83 <uri link="http://forums.gentoo.org/viewtopic.php?t=110931">HOWTO 83 <uri link="http://forums.gentoo.org/viewtopic.php?t=110931">HOWTO
84 CUPS+Samba: printing from Windows &amp; Linux</uri> 84 CUPS+Samba: printing from Windows &amp; Linux</uri>
85 </li> 85 </li>
86</ul> 86</ul>
87 87
88</body> 88</body>
198 <th>Description</th> 198 <th>Description</th>
199</tr> 199</tr>
200<tr> 200<tr>
201 <th><b>kerberos</b></th> 201 <th><b>kerberos</b></th>
202 <ti> 202 <ti>
203 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
204 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
205 below for more information. 205 information.
206 </ti> 206 </ti>
207</tr> 207</tr>
208<tr> 208<tr>
209 <th><b>acl</b></th> 209 <th><b>acl</b></th>
210 <ti> 210 <ti>
211 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
212 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
213 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
214 GID/UID schemas. 214 GID/UID schemas.
215 </ti> 215 </ti>
216</tr> 216</tr>
217<tr> 217<tr>
218 <th><b>cups</b></th> 218 <th><b>cups</b></th>
233 </ti> 233 </ti>
234</tr> 234</tr>
235<tr> 235<tr>
236 <th><b>pam</b></th> 236 <th><b>pam</b></th>
237 <ti> 237 <ti>
238 Include support for pluggable authentication modules (PAM). This provides 238 Include support for pluggable authentication modules (PAM). This provides
239 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
240 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
241 along with this option. 241 along with this option.
242 </ti> 242 </ti>
243</tr> 243</tr>
270Samba functions include: 270Samba functions include:
271</p> 271</p>
272 272
273<ul> 273<ul>
274 <li> 274 <li>
275 ACLs on ext2/3 are implemented through extended attributes (EAs). EA and 275 ACLs on ext2/3 are implemented through extended attributes (EAs). EA and
276 ACL kernel options for ext2 and/or ext3 will need to be enabled 276 ACL kernel options for ext2 and/or ext3 will need to be enabled (depending
277 (depending on which file system is being used - both can be enabled). 277 on which file system is being used - both can be enabled).
278 </li> 278 </li>
279 <li> 279 <li>
280 While Active Directory, ACL, and PDC functions are out of the intended 280 While Active Directory, ACL, and PDC functions are out of the intended
281 scope of this HOWTO, you may find these links as helpful to your cause: 281 scope of this HOWTO, you may find these links as helpful to your cause:
282 <ul> 282 <ul>
298 298
299<p> 299<p>
300First of all: be sure that all your hostnames resolve correctly. Either have a 300First of all: be sure that all your hostnames resolve correctly. Either have a
301working domain name system running on your network or appropriate entries in 301working domain name system running on your network or appropriate entries in
302your <path>/etc/hosts</path> file. <c>cupsaddsmb</c> often borks if hostnames 302your <path>/etc/hosts</path> file. <c>cupsaddsmb</c> often borks if hostnames
303don't point to the correct machines. 303don't point to the correct machines.
304</p> 304</p>
305 305
306<p> 306<p>
307Hopefully now you can make an assessment of what you'll actually need in order 307Hopefully now you can make an assessment of what you'll actually need in order
308to use Samba with your particular setup. The setup used for this HOWTO is: 308to use Samba with your particular setup. The setup used for this HOWTO is:
378<section> 378<section>
379<title>Configuring Samba</title> 379<title>Configuring Samba</title>
380<body> 380<body>
381 381
382<p> 382<p>
383The main Samba configuration file is <path>/etc/samba/smb.conf</path>. It is 383The main Samba configuration file is <path>/etc/samba/smb.conf</path>. It is
384divided in sections indicated by [sectionname]. Comments are either 384divided in sections indicated by [sectionname]. Comments are either
385# or ;. A sample <path>smb.conf</path> is included below with comments and 385# or ;. A sample <path>smb.conf</path> is included below with comments and
386suggestions for modifications. If more details are required, see the man page 386suggestions for modifications. If more details are required, see the man page
387for <path>smb.conf</path>, the installed <path>smb.conf.example</path>, the 387for <path>smb.conf</path>, the installed <path>smb.conf.example</path>, the
388Samba Web site or any of the numerous Samba books available. 388Samba Web site or any of the numerous Samba books available.
389</p> 389</p>
390 390
391<pre caption="A Sample /etc/samba/smb.conf"> 391<pre caption="A Sample /etc/samba/smb.conf">
392[global] 392[global]
393<comment># Replace MYWORKGROUPNAME with your workgroup/domain</comment> 393<comment># Replace MYWORKGROUPNAME with your workgroup/domain</comment>
450guest ok = yes 450guest ok = yes
451<comment># Modify this to "username,root" if you don't want root to 451<comment># Modify this to "username,root" if you don't want root to
452# be the only printer admin)</comment> 452# be the only printer admin)</comment>
453printer admin = <i>root</i> 453printer admin = <i>root</i>
454 454
455<comment># Now we setup our printers share. This should be 455<comment># Now we setup our printers share. This should be
456# browseable, printable, public.</comment> 456# browseable, printable, public.</comment>
457[printers] 457[printers]
458comment = All Printers 458comment = All Printers
459browseable = no 459browseable = no
460printable = yes 460printable = yes
461writable = no 461writable = no
462public = yes 462public = yes
463guest ok = yes 463guest ok = yes
464path = /var/spool/samba 464path = /var/spool/samba
465<comment># Modify this to "username,root" if you don't want root to 465<comment># Modify this to "username,root" if you don't want root to
466# be the only printer admin)</comment> 466# be the only printer admin)</comment>
467printer admin = <i>root</i> 467printer admin = <i>root</i>
510to allow users to connect to the printer. Users must exist in the system's 510to allow users to connect to the printer. Users must exist in the system's
511<path>/etc/passwd</path> file. 511<path>/etc/passwd</path> file.
512</p> 512</p>
513 513
514<pre caption="Creating the users"> 514<pre caption="Creating the users">
515# <i>smbpasswd -a root</i> 515# <i>smbpasswd -a root</i>
516 516
517<comment>(If another user is to be a printer admin)</comment> 517<comment>(If another user is to be a printer admin)</comment>
518# <i>smbpasswd -a username</i> 518# <i>smbpasswd -a username</i>
519</pre> 519</pre>
520 520
521<p> 521<p>
522The Samba passwords need not be the same as the system passwords 522The Samba passwords need not be the same as the system passwords
523in <path>/etc/passwd</path>. 523in <path>/etc/passwd</path>.
524</p> 524</p>
525 525
526<p> 526<p>
527You will also need to update <path>/etc/nsswitch.conf</path> so that Windows 527You 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> 653ServerAdmin <i>root@PrintServer</i> <comment># the person for printer-related hate-mail, e.g. you</comment>
654 654
655AccessLog /var/log/cups/access_log <comment># probably doesn't need changing</comment> 655AccessLog /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> 656ErrorLog /var/log/cups/error_log <comment># doesn't really need changing either</comment>
657 657
658LogLevel debug <comment># only while isntalling and testing, should later be 658LogLevel debug <comment># only while installing and testing, should later be
659 # changed to 'info'</comment> 659 # changed to 'info'</comment>
660 660
661MaxClients 100 <comment># I've had to set this to 1000000000 or so because some time back, 661MaxClients 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, 662 # 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 663 # 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> 664 # I tried to configure a printer with the web interface. weird.</comment>
665 665
666BrowseAddress @IF(<i>eth0</i>) <comment># Change this to your internal net interface</comment> 666BrowseAddress @IF(<i>eth0</i>) <comment># Change this to your internal net interface</comment>
667 667
668&lt;Location /&gt; 668&lt;Location /&gt;
669Order Deny,Allow 669Order Deny,Allow
670Deny From All 670Deny From All
671Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network 671Allow From <i>192.168.1.*</i> <comment># the addresses of your internel network
675 675
676&lt;Location /admin&gt; 676&lt;Location /admin&gt;
677AuthType Basic 677AuthType Basic
678AuthClass System 678AuthClass System
679Allow From <i>192.168.1.*</i> <comment># same as above, allow any host on the 679Allow 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 680 # 192.168.1.0 network to connect and do
681 # administrative tasks after authenticating</comment> 681 # administrative tasks after authenticating</comment>
682Order Deny,Allow 682Order Deny,Allow
683Deny From All 683Deny From All
684&lt;/Location&gt; 684&lt;/Location&gt;
685</pre> 685</pre>
686 686
687<p> 687<p>
688Edit <path>/etc/cups/mime.convs</path> to uncomment some lines. 688Edit <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 689<path>mime.convs</path> and <path>mime.types</path> are needed to make CUPS
690needed to make CUPS print Microsoft Office document files. 690print Microsoft Office document files.
691</p> 691</p>
692 692
693<pre caption="/etc/cups/mime.convs"> 693<pre caption="/etc/cups/mime.convs">
694<comment>(The following line is found near the end of the file. Uncomment it)</comment> 694<comment>(The following line is found near the end of the file. Uncomment it)</comment>
695application/octet-stream application/vnd.cups-raw 0 695application/octet-stream application/vnd.cups-raw 0
696</pre> 696</pre>
697 697
698<p> 698<p>
699Edit <path>/etc/cups/mime.types</path> to uncomment some lines. 699Edit <path>/etc/cups/mime.types</path> to uncomment some lines.
700</p> 700</p>
701 701
702<pre caption="/etc/cups/mime.types"> 702<pre caption="/etc/cups/mime.types">
703<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>
704application/octet-stream 704application/octet-stream
705</pre> 705</pre>
706 706
707<p> 707<p>
708CUPS needs to be started on boot, and started immediately. 708CUPS needs to be started on boot, and started immediately.
709</p> 709</p>
710 710
711<pre caption="Setting up the CUPS service" > 711<pre caption="Setting up the CUPS service" >
712<comment>(To start CUPS on boot)</comment> 712<comment>(To start CUPS on boot)</comment>
713# <i>rc-update add cupsd default</i> 713# <i>rc-update add cupsd default</i>
764<section> 764<section>
765<title>Installing the Windows printer drivers</title> 765<title>Installing the Windows printer drivers</title>
766<body> 766<body>
767 767
768<p> 768<p>
769Now that the printer should be working it is time to install the drivers for the 769Now 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 770the Windows clients to work. Samba 2.2 introduced this functionality. Browsing
771the print server in the Network Neighbourhood, right-clicking on the 771to the print server in the Network Neighbourhood, right-clicking on the
772printershare and selecting "connect" downloads the appropriate drivers 772printershare and selecting "connect" downloads the appropriate drivers
773automagically to the connecting client, avoiding the hassle of manually 773automagically to the connecting client, avoiding the hassle of manually
774installing printer drivers locally. 774installing printer drivers locally.
775</p> 775</p>
776 776

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20