set samba on ubuntu

sudo apt-get install samba samba-common

smbd --version

sudo apt-get install python-glade2 system-config-samba

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak 
sudo rm /etc/samba/smb.conf 
sudo touch /etc/samba/smb.conf 
sudo nano /etc/samba/smb.conf


Add this, in your smb.conf file (or change it according to your requirement):

#======================= Global Settings ===================================== 
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#============================ Share Definitions ============================== 
[bunyiam]
 path = /home/user
 valid users = bunyiam
 guest ok = nouserwritable = yes
 browsable = yes
 public = no
[bunyiam1]
 path = /home/user1
 valid users = user1
 guest ok = no
 writable = yes
 browsable = yes
 public = no



sudo service smbd restart


sudo addgroup smbgrp

cd /samba/
sudo chown -R arbab:smbgrp secure/ 
ls -l 
sudo chmod -R 0770 secure/
ls -l

sudo adduser arbab
sudo adduser arbab smbgrp
sudo smbpasswd -a arbab


sudo service smbd restart 
sudo testparm



 

 

ที่มา : https://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/