1. install samba
sudo apt-get install samba
sudo apt-get install cifs-utils
sudo apt-get install samba-common
notice:
samba-common may be installed when installing samba
2. setup permissions for directory to be shared
sudo chmod 777 [directory_to_be_shared]
3. modify /etc/samba/smb.conf
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
add the below part at the end:
***************************************************************
# for u-boot-2012.04.01 directory. gzsh. 2016.04.02
[share]
path = /work/uboot/u-boot-2012.04.01
available = yes
browsable = yes
public = yes
writable = yes
# end of u-boot-2012.04.01 directory
***************************************************************
public = yes, means username and password of Ubuntu are not needed when accessing this directory on Windows,
while 'public = no', it is needed.
4. add a user to smb user group
sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a aspirs
5. restart smaba server
sudo /etc/init.d/samba restart
or
sudo apt-get install samba
sudo apt-get install cifs-utils
sudo apt-get install samba-common
notice:
samba-common may be installed when installing samba
2. setup permissions for directory to be shared
sudo chmod 777 [directory_to_be_shared]
3. modify /etc/samba/smb.conf
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
add the below part at the end:
***************************************************************
# for u-boot-2012.04.01 directory. gzsh. 2016.04.02
[share]
path = /work/uboot/u-boot-2012.04.01
available = yes
browsable = yes
public = yes
writable = yes
# end of u-boot-2012.04.01 directory
***************************************************************
public = yes, means username and password of Ubuntu are not needed when accessing this directory on Windows,
while 'public = no', it is needed.
4. add a user to smb user group
sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a aspirs
5. restart smaba server
sudo /etc/init.d/samba restart
or
sudo service samba restart # samba service name may also be smbd, if this, the command is "sudo service smbd restart"
reference:
Ubuntu下配置samba实现文件夹共享
http://www.cnblogs.com/phinecos/archive/2009/06/06/1497717.html