win7和centos的samba搭建
发布时间:2024-11-25
发布时间:2024-11-25
centos搭建samba共享目录,win7可以访问
确保selinux处于关闭状态
方法:修改/etc/selinux/config 将SELINUXTYPE=disable,
然后在/boot/grub/menu.lst中,KEYTABLE=us rd_NO_DM rhgb quiet 后添加 selinux=0
确保iptables处于关闭状态,或者允许远程主机访问
/etc/init.d/iptables status 检查状态
/etc/init.d/iptables stop 关闭功能
1、修改/etc/samba/smb.conf
2、创建/share目录
匿名访问配置:(需要将/share目录置为nobody:nobody)
[global]
workgroup = WORKGROUP
netbios name = test1
server string = test1's Samba Server
security = share
[public]
path = /share
centos搭建samba共享目录,win7可以访问
writeable = yes
browseable = yes
guest ok = yes
需要进行的操作:
chown -R nobody:nobody /share
非匿名访问配置:
[global]
workgroup = WORKGROUP
server string = test2 Samba Server Version %v
netbios name = test2
log file = /var/log/samba/log.%m
security = user
[public]
path = /share
browseable = yes
writable = yes
available = yes
centos搭建samba共享目录,win7可以访问
需要的操作:smbpasswd -a root 给smb设置一个访问的账号密码
3、测试通畅
testparm 可以显示配置对不对
smbclient //127.0.0.1/public 查看本地能否链接
4、win7远程访问 \\ip地址\public