1. 我先執行 rpm -qa | grep samba, 進入 /ect/samba
2. 再執行 "#/sbin/service smb start"
apt-get install samba
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
|
[global] #samba
workgroup = STUDENT_SAMBA #相當於 Windows 下的工作群組,可自取,請用英文
server string = Samba %v on %L #samba server
hosts allow = 163.19.59.0/255.255.255.0 #允許連線的主機:為了安全起見,一定要限制允許連線的範圍,這裡是以一個 Class C 為例,請依自己學校狀況設定
log file = /var/log/samba/%m.log #設定 log
max log size = 50 #紀錄檔最大容量,單位Kb
security = user #安全等級設定:由提供服務的
#security
encrypt passwords =
#使用加密的方式傳送密碼:Windows
domain master = yes #成為網域主瀏覽器:此參數可以管理跨子網域的瀏覽服務 local master = yes #成為區域主瀏覽器:提供區域內主機的瀏覽服務 preferred master =
#開機就強迫舉行瀏覽權選舉,此參數可以提高
#若同一區域內有多台
os level = 255 #NT
domain logons = yes #把 Samba 當成網域主控站
logon drive = x: #使用者家目錄網路磁碟機的代號:可自取,這裡是以 x
logon home = \\%L\%U logon script =
#登入批次檔設定 :當使用者登入網域後,會在使用者端電腦自動執行此 M$-DOS 格式批次檔, #預設值是 logon
#(此設定值和下面的 [netlogon] 分享區有關)
time server = yes #啟動
wins support = yes #啟動 wins server 功能:一個網域內只能有一個
#WINS=Windows Internet Name Serving
deadtime = 20 #使用者20 分鐘沒有動作
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 #這參數可以增進連線速率
dos
unix
#samba
#以前的設定
#預設值:unix
admin
#設定管理者:這裡是以
###############
[homes] comment
browseable
writable
force
[netlogon] comment
path
write
#誰可以寫入
[資源分享] comment
path
valid
#valid
#加
write
force
[作業繳交] comment
path
valid
write
force
###底下是寫給有在使用
[VDN] comment
path
valid
write
force
[VCD] comment
path
valid
write
force
|
設定檔檢查:testparm
#建立
netlogon 資料夾和修和修改權限
mkdir -p /home/samba/netlogon
chmod 755 /home/samba/netlogon
chown sysadm.sysadm /home/samba/netlogon
http://opensource.nchc.org.tw/intro_to_linux/part4/samba.html
http://linux.vbird.org/linux_server/0370samba.php#server




