- Set up Samba file sharing for Linux, Windows, Tablet
- Allow access of specified resources without login under the same LAN
- Allow login access of restricted resources under the same LAN
Install Steps
1. install Samba:
sudo apt-get install samba
sudo smbd start
sudo ufw disable
2. configure /etc/samba/smb.conf:
sample file setup:
[global]
workgroup = workgroup
server string = %h server (Samba, Ubuntu)
security = user
passdb backend = tdbsam
cups options = raw
map to guest = Bad User
guest ok = yes
[homes]
comment = Home Directories
path = /home/user/Documents
valid users = %S
read only = No
create mask = 0755
browseable = No
[public]
comment = tmp directory
path = /home/public
read only = No
note that if public path is under /home/user, it doesn't work.
3. test:
testparm
4. add user:
sudo smbpasswd -a user
5. restart samba:
sudo /etc/init.d/samba restart
View Shares
Suppose the Samba server IP address is 192.168.0.18
1. under Linux file manager:
smb://192.168.0.18/ --- to access public shareor
smb://192.168.0.18/user --- to access restricted share
2. under Windows:
//192.168.0.18/ --- to access public share
or
//192.168.0.18/user --- to access restricted share
3. under tablet:
install EZ file manager