官网 https://www.samba.org/
配置
添加用户
配置文件 /etc/samba/smb.conf
1
2
3
4
5
6
7
8
9
10
11
12
|
[share]
comment = share file
path = /data/samba
public = yes
writable = no
available = yes
browseable = yes
valid users = smb
create mask = 0755
directory mask = 0755
guest ok = no
read only = yes
|
挂载
windows or cygwin
1
2
|
打开本地cmd
net use k: \\SMB_IP\share SMB_PASS /user:SMB_USER /PERSISTENT:YES
|
ansible
1
2
|
PowerShell -Command "net use k: \\\\SMB_IP\share SMB_PASS /user:SMB_USER"
cd /cygdrive/k
|