随笔 - 741  文章 - 0  评论 - 260  阅读 - 416万

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

 

posted on   莫水千流  阅读(389)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
< 2012年4月 >
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12

点击右上角即可分享
微信分享提示