共享相关
原创2017/9/19...小于 1 分钟
Share
NFS
SMB
client for linux
# Ubuntu
sudo apt-get install cifs-utils
# 查看挂载参数
cat /etc/mtab
# mount configuration via fstab, vers=3.02必须是第一个参数
//vm-svr-nas/Public /NAS/Public cifs vers=3.02,guest 0 0
# mount configuration
mount -v -t cifs //192.168.1.1/share /data/nas/share -o cred=/data/nas/.smbcred,vers=3.0,domain=localhostold config for Debian
# fstab
//192.168.1.1/home /data/nas/home cifs cred=/data/nas/.smbcred,domain=localhost,uid=auser,gid=auser,vers=3.0,iocharset=utf8 0 0
//192.168.1.1/share /data/nas/share cifs cred=/data/nas/.smbcred,domain=localhost,uid=auser,gid=auser,vers=3.0,iocharset=utf8 0 0
//192.168.1.1/IT /data/nas/IT cifs cred=/data/nas/.smbcred,domain=localhost,uid=auser,gid=auser,vers=3.0,iocharset=utf8 0 0
# .smbcred
# permission -rw------- root root
username=auser
password=YOUR_PASSWORDclient for windows
net use W: //HOSTNAME/c$ "YOUR_PASSWORD" /user:"username"
net use X: "\\HOSTNAME\home" "YOUR_PASSWORD" /user:"username"
net use Y: //HOSTNAME/c$ "YOUR_PASSWORD" /user:"username"
net use Z: "\\HOSTNAME\share\公共" "YOUR_PASSWORD" /user:"username" /persistent:yes