create samba server

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 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值