workgroup = xxxx 說明:要設置成和windows一樣的工作組 netbios name = xxxxx 說明: 在windows里出現的linux計算機的名稱 server string = xxxx 說明:linux的計算機的名稱 security = share 說明:匿名共享級訪問
path = /home/lserver 說明:你可以在自己覺得合適的位置建立一個目錄作為windows的訪問目錄,我的是lserver writable = yes 說明:目錄可以寫 browseable = yes 說明:目錄可以瀏覽 guest ok = yes 說明:匿名用戶登錄 7.然後運行命令: testparm 返回結果為: Load smb config files from /etc/samba/smb.conf Processing section "" Loaded services file OK. Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions 說明smb.conf配置成功 8.運行命令: service smb start 返回結果為: 啟動 SMB 服務: [確定] 說明samba服務配置成功 9.接下來,在windows的IE或資源管理器中上方的地址欄中輸入\\x.x.x.x (x.x.x.x為你的linux機器網路地址) 就能看到你的linux機器中共享的文件夾