Archive:Samba: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "{{Isengard updated}}" to "") |
|||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<section begin="intro" />Samba the Linux and Unix implementation SMB/CIFS (aka, Windows File Sharing). If it is not included in a given OS distro, it can be installed easily to share files to Kodi (among other uses). Samba/SMB is often a good choice due to it being highly compatible with other computers, regardless of the OS.<section end="intro" /> | |||
<section begin="intro" />Samba the Linux and Unix implementation | |||
* http://www.samba.org | * http://www.samba.org | ||
Line 7: | Line 5: | ||
== Installing == | == Installing == | ||
;Gentoo | ;Gentoo | ||
< | <syntaxhighlight lang="bash" enclose="div">emerge samba</syntaxhighlight> | ||
;Debian/Ubuntu | ;Debian/Ubuntu | ||
< | <syntaxhighlight lang="bash" enclose="div">sudo apt-get install samba</syntaxhighlight> | ||
=== Compile from source === | === Compile from source === | ||
Installing Samba regardless of distro | Installing Samba regardless of distro | ||
< | <syntaxhighlight lang="bash" enclose="div"> | ||
wget http://us4.samba.org/samba/ftp/samba-latest.tar.gz | wget http://us4.samba.org/samba/ftp/samba-latest.tar.gz | ||
tar -xvf samba-latest.tar.gz | tar -xvf samba-latest.tar.gz | ||
cd samba-{version} | cd samba-{version} | ||
./configure | ./configure | ||
make install</ | make install</syntaxhighlight> | ||
== Configuring == | == Configuring == | ||
Line 27: | Line 25: | ||
=== Global configuration === | === Global configuration === | ||
< | <syntaxhighlight lang="xml" enclose="div"> | ||
[global] | [global] | ||
workgroup = <workgroup> | workgroup = <workgroup> | ||
Line 38: | Line 36: | ||
local master = no | local master = no | ||
dns proxy = no | dns proxy = no | ||
</ | </syntaxhighlight> | ||
:;workgroup : Should be set to the workgroup your home pc uses if you planning on accessing this share from a windows PC | :;workgroup : Should be set to the workgroup your home pc uses if you planning on accessing this share from a windows PC | ||
:;netbios name : This is the name that will be displayed when browsing the your Network Neighborhood | :;netbios name : This is the name that will be displayed when browsing the your Network Neighborhood | ||
Line 44: | Line 42: | ||
=== Share configuration === | === Share configuration === | ||
< | <syntaxhighlight lang="xml" enclose="div"> | ||
[public] | [public] | ||
path = <dir to share> | path = <dir to share> | ||
Line 50: | Line 48: | ||
only guest = yes | only guest = yes | ||
writable = yes | writable = yes | ||
</ | </syntaxhighlight> | ||
:;path | :;path | ||
::Set this to the path to be shared by samba | ::Set this to the path to be shared by samba | ||
Line 57: | Line 55: | ||
Finally resart samba service. | Finally resart samba service. | ||
< | <syntaxhighlight lang="bash" enclose="div"> | ||
sudo service smdb restart | sudo service smdb restart | ||
Line 63: | Line 61: | ||
sudo smbd restart | sudo smbd restart | ||
</ | </syntaxhighlight> | ||
== See also == | == See also == | ||
* [http://www.samba.org/samba/docs/using_samba/ch06.html Using samba] | * [http://www.samba.org/samba/docs/using_samba/ch06.html Using samba] | ||
* [https://wiki.archlinux.org/index.php/Samba/Tips_and_tricks Samba tips and tricks] | * [https://wiki.archlinux.org/index.php/Samba/Tips_and_tricks Samba tips and tricks] | ||
Latest revision as of 07:25, 14 November 2020
Samba the Linux and Unix implementation SMB/CIFS (aka, Windows File Sharing). If it is not included in a given OS distro, it can be installed easily to share files to Kodi (among other uses). Samba/SMB is often a good choice due to it being highly compatible with other computers, regardless of the OS.
Installing
- Gentoo
emerge samba
- Debian/Ubuntu
sudo apt-get install samba
Compile from source
Installing Samba regardless of distro
wget http://us4.samba.org/samba/ftp/samba-latest.tar.gz tar -xvf samba-latest.tar.gz cd samba-{version} ./configure make install
Configuring
Note: The example below is for a public share.
Samba's configuration is stored /etc/samba/smb.conf
. All the following items should be placed in that file.
Global configuration
[global] workgroup = <workgroup> netbios name = <name of server> server string = <title> log file = /var/log/samba/log.%m max log size = 50 map to guest = bad user socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 local master = no dns proxy = no
- workgroup
- Should be set to the workgroup your home pc uses if you planning on accessing this share from a windows PC
- netbios name
- This is the name that will be displayed when browsing the your Network Neighborhood
- server string
- The title of the server that will be displayed in windows(This is not the share name)
[public] path = <dir to share> public = yes only guest = yes writable = yes
- path
- Set this to the path to be shared by samba
Run testparm
to check your smb.conf for internal correctness.
Finally resart samba service.
sudo service smdb restart # or sudo smbd restart