服务端安装:
apt install samba
客户端安装:
apt install samba-client cifs-utils
服务端配置文件:
/etc/samba/smb.conf (无密码指定IP访问)
[global]
workgroup = MYGROUP
unix charset = UTF-8
interfaces = 172.0.0.0/24 eth0
hosts allow = 172.0.0.3
bind interfaces only = yes
netbios name = mini
log file = /home/samba/%m.log
max log size = 1000
[box]
comment = share all
path = /home/box
writable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
客户端运行:
mount -t cifs -o guest,vers=2.0 //172.0.0.2/box /home/box
sudo apt install nfs-common cifs-utils #如提示格式出错需安装这两个组件
两个box文件夹赋予777权限
没有评论:
发表评论