samba版本4.1
添加权限:
useradd samba_viki passwd samba_viki viki@xxxx /usr/local/samba/bin/smbpasswd -a samba_viki 简单连接:mount -t cifs //121.36.210.79/shared /var/www/html/ai_record -o user=samba_viki,password=viki@xxxx
配置文件:smb.cof
[global] workgroup = WORKGROUP server string = Server-a230eec0-3c89-4b4c-99bd-fbb063586b4d Version %v netbios name = vikisamba log file = /var/log/samba/log.%m max log size = 50 security = user passdb backend = tdbsam printing = cups printcap name = cups load printers = yes cups options = raw write cache size = 1024000 read size = 102400 #socket options = TCP_NODELAY SO_KEEPALIVE SO_RCVBUF=102400 SO_SNDBUF=102400 IPTOS_LOWDELAY socket options = TCP_NODELAY getwd cache = yes follow symlinks = no wide links = no read raw = yes write raw = yes large readwrite = yes getwd cache = yes strict locking = no fake oplocks = yes # oplocks = no [viki] comment = samba_viki path = /var/zmrh/wav_core_file writable = yes public = yes valid users = samba_viki browseable = yes directory mask = 0777 create mask = 0777 #write list = samba_viki
客服端挂载:
vi /etc/fstab //10.150.169.17/viki /var/www/html/ai_record cifs dir_mode=0777,file_mode=0777,username=samba_viki,password=viki@xxxx fdisk -H mount -a
权限说明:
# 挂载smb使用读写777权限 sudo mount -t cifs -o "rw,dir_mode=0777,file_mode=0777,username=winuser,password=winpwd" //192.168.100.200/共享目录 /mnt/share
发表评论