| 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.30 2007/07/08 02:22:04 nightmorph Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/quick-samba-howto.xml,v 1.31 2007/07/29 06:48:12 nightmorph 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> |
| … | |
… | |
| 21 | |
21 | |
| 22 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
22 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 23 | <!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
23 | <!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
| 24 | <license/> |
24 | <license/> |
| 25 | |
25 | |
| 26 | <version>1.18</version> |
26 | <version>1.19</version> |
| 27 | <date>2007-07-07</date> |
27 | <date>2007-07-28</date> |
| 28 | |
28 | |
| 29 | <chapter> |
29 | <chapter> |
| 30 | <title>Introduction to this HOWTO</title> |
30 | <title>Introduction to this HOWTO</title> |
| 31 | <section> |
31 | <section> |
| 32 | <title>Purpose</title> |
32 | <title>Purpose</title> |
| … | |
… | |
| 155 | </li> |
155 | </li> |
| 156 | </ul> |
156 | </ul> |
| 157 | |
157 | |
| 158 | <p> |
158 | <p> |
| 159 | The main package we use here is net-fs/samba, however, you will need a kernel |
159 | The main package we use here is net-fs/samba, however, you will need a kernel |
| 160 | with smbfs support enabled in order to mount a samba or windows share from |
160 | with cifs support enabled in order to mount a samba or windows share from |
| 161 | another computer. CUPS will be emerged if it is not already. |
161 | another computer. CUPS will be emerged if it is not already. |
| 162 | app-antivirus/clamav will be used also, but others should be easily adapted to |
162 | app-antivirus/clamav will be used also, but others should be easily adapted to |
| 163 | work with Samba. Gentoo's samba ebuild supports all kinds of virus scanning |
163 | work with Samba. Gentoo's samba ebuild supports all kinds of virus scanning |
| 164 | technologies, such as Sophos, FProt, Fsav, Trend, Icap, Nai, ... |
164 | technologies, such as Sophos, FProt, Fsav, Trend, Icap, Nai, ... |
| 165 | </p> |
165 | </p> |
| … | |
… | |
| 991 | <section> |
991 | <section> |
| 992 | <title>Mounting a Windows or Samba share in GNU/Linux</title> |
992 | <title>Mounting a Windows or Samba share in GNU/Linux</title> |
| 993 | <body> |
993 | <body> |
| 994 | |
994 | |
| 995 | <p> |
995 | <p> |
| 996 | Now is time to configure our kernel to support smbfs. Since I'm assumming we've |
996 | Now is time to configure our kernel to support cifs. Since I'm assuming |
| 997 | all compiled at least one kernel, we'll need to make sure we have all the right |
997 | we've all compiled at least one kernel, we'll need to make sure we have all the |
| 998 | options selected in our kernel. For simplicity's sake, make it a module for ease |
998 | right options selected in our kernel. For simplicity's sake, make it a module |
| 999 | of use. It is the author's opinion that kernel modules are a good thing and |
999 | for ease of use. It is the author's opinion that kernel modules are a good thing |
| 1000 | should be used whenever possible. |
1000 | and should be used whenever possible. |
| 1001 | </p> |
|
|
| 1002 | |
|
|
| 1003 | <pre caption="Relevant kernel options" > |
|
|
| 1004 | CONFIG_SMB_FS=m |
|
|
| 1005 | CONFIG_SMB_UNIX=y |
|
|
| 1006 | </pre> |
|
|
| 1007 | |
|
|
| 1008 | <p> |
1001 | </p> |
|
|
1002 | |
|
|
1003 | <pre caption="Kernel support" > |
|
|
1004 | CONFIG_CIFS=m |
|
|
1005 | </pre> |
|
|
1006 | |
|
|
1007 | <p> |
| 1009 | Then make the module/install it; insert them with: |
1008 | Then make the module/install it; insert it with: |
| 1010 | </p> |
1009 | </p> |
| 1011 | |
1010 | |
| 1012 | <pre caption="Loading the kernel module"> |
1011 | <pre caption="Loading the kernel module"> |
| 1013 | # <i>modprobe smbfs</i> |
1012 | # <i>modprobe cifs</i> |
| 1014 | </pre> |
1013 | </pre> |
| 1015 | |
1014 | |
| 1016 | <p> |
1015 | <p> |
| 1017 | Once the module is loaded, mounting a Windows or Samba share is possible. Use |
1016 | Once the module is loaded, mounting a Windows or Samba share is possible. Use |
| 1018 | <c>mount</c> to accomplish this, as detailed below: |
1017 | <c>mount</c> to accomplish this, as detailed below: |
| 1019 | </p> |
1018 | </p> |
| 1020 | |
1019 | |
| 1021 | <pre caption="Mounting a Windows/Samba share"> |
1020 | <pre caption="Mounting a Windows/Samba share"> |
| 1022 | <comment>(The syntax for mounting a Windows/Samba share is: |
1021 | <comment>(The syntax for mounting a Windows/Samba share is: |
| 1023 | mount -t smbfs [-o username=xxx,password=xxx] //server/share /mnt/point |
1022 | mount -t cifs [-o username=xxx,password=xxx] //server/share /mnt/point |
| 1024 | If we are not using passwords or a password is not needed)</comment> |
1023 | If we are not using passwords or a password is not needed)</comment> |
| 1025 | |
1024 | |
| 1026 | # <i>mount -t smbfs //PrintServer/public /mnt/public</i> |
1025 | # <i>mount -t cifs //PrintServer/public /mnt/public</i> |
| 1027 | |
1026 | |
| 1028 | <comment>(If a password is needed)</comment> |
1027 | <comment>(If a password is needed)</comment> |
| 1029 | # <i>mount -t smbfs -o username=USERNAME,password=PASSWORD //PrintServer/public /mnt/public</i> |
1028 | # <i>mount -t cifs -o username=USERNAME,password=PASSWORD //PrintServer/public /mnt/public</i> |
| 1030 | </pre> |
1029 | </pre> |
| 1031 | |
1030 | |
| 1032 | <p> |
1031 | <p> |
| 1033 | After you mount the share, you would access it as if it were a local drive. |
1032 | After you mount the share, you would access it as if it were a local drive. |
| 1034 | </p> |
1033 | </p> |