码迷,mamicode.com
首页 > Windows程序 > 详细

Sambar,实现Linux和Windows共享

时间:2016-11-20 06:40:21      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:name   它的   string   文件夹   figure   jar包   str   root   install   

我下载的是tar的jar包,不是rpm,rpm就不多说了。目的是让Windows能够共享Linux系统的文件夹

1.进入到source文件夹;

2../configure->make->make install

3.在/etc/ld.so.config中,附加“usr/local/samb/lib",目的是sambar在运行的时候能够找到需要的so文件。Linux和java的差别在于它的so以及配置文件都是统一放置;

4.执行ldconfig进行保存;

5.配置文件sam.conf

[global]

workgroup = WORKGROUP
netbios name = LinuxSir05
server string = Linux Samba Server TestServer
security = share

[linuxsir]
path = /opt/linuxsir
writeable = yes
browseable = yes

guest ok = yes

1)workgroup是要加入的Windows的工作组;windows默认的都是WORKGROUP,如果变化,需要调整;

2)netbios name是未来将会在Windows共享的名称;

3)path,是要共享给Windows的目录;

4)guest ok,匿名用户访问;

6.运行/usr/local/samb/sbin/smbd以及/usr/local/samb/sbin/nmbd,前者用于共享,后者用于名称发现;

至此,已经可以在Windows中通过映射,成功共享(需要全路径,例如基于上述配置:\\192.168.1.45\linuxsir)

但是你会发现Windows只有读的权限,没有写入权限(无法向共享区放入文件)

7.在[global]区域再添加一个guest account = root即可。这里一定是先要通过前6步让Windows发现,然后再添加guest account = root,具体原因不知。

Sambar,实现Linux和Windows共享

标签:name   它的   string   文件夹   figure   jar包   str   root   install   

原文地址:http://www.cnblogs.com/xiashiwendao/p/6081857.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!