1.
|
What is Samba? |
|
Samba is a networking tool that enables Linux to participate
in Windows networks. There are two parts to Samba, one being the
server which shares out files and printers for other PC's to use, and
the other being the client utilities, which allow Linux to access
files and printers on other Windows/Samba PCs. |
2.
|
How do I install Samba? |
|
|
3.
|
How do I add/edit/delete network users when
using authentication? |
|
Read How do I install Samba?
-
To add network user
-
To edit network user
sudo smbpasswd -a system_username
-
To delete network user
sudo smbpasswd -x system_username
|
4.
|
How do I share home folders with read only permission? |
|
|
5.
|
How do I share home folders with read/write
permission? |
|
Read How do I install Samba?
-
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
-
Find this line
...
; security = user
...
-
Replace with the following lines
security = user
username map = /etc/samba/smbusers
Alternatively replace with the following line to skip
authentication
security = share
-
Find this section
...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = no
...
-
Replace with the following lines
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
writable = yes
Save the edited file (sample/smb.conf_sharehomefoldersreadwritesecurityuser)
If using authentication read How do I add/edit/delete network users when using authentication?
-
sudo testparm sudo /etc/init.d/samba restart
|
6.
|
How do I share a group folder with read only
permission? |
|
Read How do I install Samba?
-
sudo mkdir /home/group sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
-
Find this line
...
; security = user
...
-
Replace with the following lines
security = user
username map = /etc/samba/smbusers
Alternatively replace with the following line to skip
authentication
security = share
-
Append the following lines at the end of
file
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
Save the edited file ( sample/smb.conf_sharegroupfoldersreadsecurityuser)
If using authentication read How do I add/edit/delete network users when using authentication?
-
sudo testparm sudo /etc/init.d/samba restart
|
7.
|
How do I share a group folder with read/write
permission? |
|
Read How do I install Samba?
-
sudo mkdir /home/group sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
-
Find this line
...
; security = user
...
-
Replace with the following lines
security = user
username map = /etc/samba/smbusers
Alternatively replace with the following line to skip
authentication
security = share
-
Append the following lines at the end of
file
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = yes
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
Save the edited file (sample/smb.conf_sharegroupfoldersreadwritesecurityuser)
If using authentication read How do I add/edit/delete network users when using authentication?
-
sudo testparm sudo /etc/init.d/samba restart
|
8.
|
How do I share public folders with read only
permission? |
|
Read How do I install Samba?
-
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
-
Find this line
...
; security = user
...
-
Replace with the following lines
security = user
username map = /etc/samba/smbusers
Alternatively replace with the following line to skip
authentication
security = share
-
Append the following lines at the end of
file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
Save the edited file (sample/smb.conf_sharepublicfoldersreadsecurityuser)
If using authentication read How do I add/edit/delete network users when using authentication?
-
sudo testparm sudo /etc/init.d/samba restart
|
9.
|
How do I share public folders with read/write
permission? |
|
Read How do I install Samba?
-
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
-
Find this line
security = user
-
Replace with the following lines to use
authentication
security = user
username map = /etc/samba/smbusers
Alternatively replace with the following line to skip authentication
security = share
-
Append the following lines at the end of
file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
Save the edited file (sample/smb.conf_sharepublicfoldersreadwritesecurityuser)
If using authentication read How do I add/edit/delete network users when using authentication?
-
sudo testparm sudo /etc/init.d/samba restart
|