如何将linux上某一个文件可以直接映射到windows呢?
1、安装samba软件
yum -y install samba samba-client
修改内容
vim /etc/samba/smb.conf
#See smb.conf.example for a more detailed config file or
#read the smb.conf manpage.
#Run ‘testparm’ to verify the config is correct after
#you modified it.
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
follow symlinks = yes
wide links = yes
unix extensions = no
;[homes]
; comment = Home Directories
;valid users = %S
;valid users = MYDOMAIN%S
; browseable = no
; writable = yes
[printers]
comment = All Printers
path = /var/tmp
printable = yes
create mask = 0600
browseable = no
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[share]
path = /data/project/share
security = share
browseable = yes
public = yes
writeable = yes
guest ok = yes
;force user = nobody
;force group = nogroup
;force creat mode 0664
;force directory mode 0755
;creat mode = 0664
;directory mode = 0755
重启
service smb restart
共享文件夹
新建文件夹
mkdir 1111
修改文件夹权限
chmod 777 1111
chmod a+t 1111
#创建分组用户,用户名为wang,分组为shengxin
useradd -G shengxin wang
输入密码
passwd wang
添加用户至samba中,并输入密码
pdbedit -a -u wang
windows登录,输入ip
输入用户名及密码
每一次服务器重启都需要
service smb restart
systemctl stop firewalld
setenforce 0