#yum install samba samba-client samba-common
vim /etc/samb/smb.conf
-------------------------------------------Start-----------------------------------------------------
[global]
workgroup = ARSSYSTEM
server string = ARS Data Center System
security = user
netbios name = ARSDC08
browseable = No
; passdb backend = tdbsam
passdb backend = smbpasswd
printing = cups
printcap name = cups
load printers = no
cups options = raw
disable spoolss = yes
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
veto files = /*.mp3*/ #Protect file mp3
log file = /var/log/samba/%m.log
log level = 3
debug timestamp = yes
host msdfs = no
ntlm auth = yes # For user windows xp access
-------------------------------------------//End//---------------------------------------------------
การปรับสิทธิ์ให้ผู้ใช้งาน 2 กลุ่ม เช่น user01 อยู่ในกลุ่ม user, tech สามารถสร้างและให้คนที่อยู่ในกลุ่มอื่นแก้ไขไฟล์ได้พร้อมกัน โดยการบังคับให้เวลาสร้าง Folder, File, อยู่ในกลุ่ม tech แทนกลุ่ม user
[tech]
comment = Tech department only
inherit acls = Yes
path = /mnt/tech
guest ok = no
browseable = yes
write list = @techAdmin #only the group that has write privileges
valid users = @tech
force group = tech #this is so that all files written to the share will be set to "chgrp tech" if you dont do this only the user that created the file will have access to it.
create mask = 0775 #this forces all created documents to have 775 perms (WR-WR-WR)
directory mask = 0775 #same for directories
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment