ubunt 下 配置samba 服务器

一. samba的安装:

sudo apt-get insall samba
sudo apt-get install smbfs


 

二。修改/etc/samba/smb.conf

sudo gedit /etc/samba/smb.conf

 

在smb.conf最后添加

[myShare]
comment = Shared Folder with username and password
path = /home/wangy
writeable = yes
browseable = yes
guest ok = yes

create mask = 0777
directory mask = 0777
available = yes

public=no     //no表示除了user1这个用户,其它用户在进入samba服务器后看不见wangy这个目录,如果为yes,虽然能看见wangy这个目录,但除了user1这个用户能进入这个目录,其它人进不了。

 

为了使gesst用户可以访问,还要将security 设定为share


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
#   security = user
security = share

 

三  修改共享目录/home/wangy权限

cd /home/wangy

sudo chmod -R 777 /home/wangy

 

四.重新启动服务

sudo service samba restart

其他命令

sudo service samba start

sudo service samba stop

 

#/etc/init.d/samba restart
#/etc/init.d/samba start

#/etc/init.d/samba stop

 

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值