From charlesreid1

(Created page with "First, get samba. then, start samba: <pre> $ apt-get install samba $ service smb start </pre> samba configuration is located in <code>/etc/samba/smb.conf</code>")
 
No edit summary
Line 8: Line 8:


samba configuration is located in <code>/etc/samba/smb.conf</code>
samba configuration is located in <code>/etc/samba/smb.conf</code>
here is a basic configuration for samba:
<pre>
[global]
server string = File Server
workgroup = HOME-NET
security = user
map to guest = Bad User
name resolve order = bcast hosts wins
include = /etc/samba/smbshared.conf
</pre>
server string - description you see if browsing shares
workgroup - namespace for containing all systems for a particular purpose (your LAN name, which enables everything on that LAN to see each other). Windows: My Computer > Properties > Workgroup name should be listed in the window that appears
security setting tells samba to use the user's username and password for authentication. if this works, the user will not be prompted
map to guest bad user - if the username and password don't match a provided account, treat the user as a guest. this can be removed.
name resolve order bcast host wins - determines order of name resolution. in this case, use whatever is broadcast first, followed by etc hosts, followed by wins utility.
include statement gives us ability to include another configuration file into this configuration file, and define our shares there.
==samba shares==
here is the samba shares file:
<pre>
[Documents]
## My documents
        path = /share/docs
        public = yes
        writable = no
[Public]
## Public files
        path = /share/public     
        create mask = 0664
        force create mode = 0664
        directory mask = 0777
        force directory mode = 0777
        public = yes
        writable = yes
</pre>

Revision as of 19:54, 13 March 2016

First, get samba. then, start samba:

$ apt-get install samba

$ service smb start

samba configuration is located in /etc/samba/smb.conf

here is a basic configuration for samba:

[global]
server string = File Server
workgroup = HOME-NET
security = user
map to guest = Bad User
name resolve order = bcast hosts wins
include = /etc/samba/smbshared.conf

server string - description you see if browsing shares

workgroup - namespace for containing all systems for a particular purpose (your LAN name, which enables everything on that LAN to see each other). Windows: My Computer > Properties > Workgroup name should be listed in the window that appears

security setting tells samba to use the user's username and password for authentication. if this works, the user will not be prompted

map to guest bad user - if the username and password don't match a provided account, treat the user as a guest. this can be removed.

name resolve order bcast host wins - determines order of name resolution. in this case, use whatever is broadcast first, followed by etc hosts, followed by wins utility.

include statement gives us ability to include another configuration file into this configuration file, and define our shares there.

samba shares

here is the samba shares file:

[Documents]
## My documents
        path = /share/docs
        public = yes
        writable = no

[Public]
## Public files
        path = /share/public      
        create mask = 0664
        force create mode = 0664
        directory mask = 0777
        force directory mode = 0777
        public = yes
        writable = yes