附上我的配置文件,重点在 Share Definitions 下面 [global] workgroup = WORKGROUP server string = Samba Server netbios name = Raspi security = user time server = Yes deadtime = 3600 server role = standalone server ; hosts allow = 192.168.1. 192.168.2. 127. ; guest account = pcguest log file = /data/logs/samba/log.%m max log size = 50 ; realm = MY_REALM ; passdb backend = tdbsam ; include = /usr/local/samba/lib/smb.conf.%m ; interfaces = 192.168.12.2/24 192.168.13.2/24 ; logon path = \\%L\Profiles\%U ; wins support = yes ; wins server = w.x.y.z ; wins proxy = yes dns proxy = no ; add user script = /usr/sbin/useradd %u ; add group script = /usr/sbin/groupadd %g ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u ; delete user script = /usr/sbin/userdel %u ; delete user from group script = /usr/sbin/deluser %u %g ; delete group script = /usr/sbin/groupdel %g #============================ Share Definitions ============================== [wwwroot] comment = Raspberry Pi path = /data/wwwroot public = No browseable = Yes writeable = Yes create mask = 0755 directory mask = 0755 valid users = root [NAS] comment = Raspberry Pi NAS path = /mnt/raid1 public = No browseable = Yes writeable = Yes create mask = 0755 directory mask = 0755 valid users = root [Shimmer] comment = Shimmer path = /mnt/raid1/Medias/Movies public = No browseable = Yes writeable = Yes create mask = 0755 directory mask = 0755 valid users = shimmer
附上我的配置文件,重点在 Share Definitions 下面