linux中samba伺服器配置的方法

來源:互聯網
上載者:User

SAMBA 配置

yum -y install samba samba-client
mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf

[global]
netbios name = WWWW
workgroup = SHSPS
hosts allow = 192.168.1.0/255.255.255.0
hosts deny = ALL
security = user
encrypt passwords = yes
deadtime = 20
admin users = sysadm

[homes]
comment = %U 的家目錄
browseable = no
writable = yes
force create mode = 0755

[homework]
comment = 作業繳交
path = /home/homework
valid users = sysadm,@shsps
#valid users 表示誰可以進入這個資料夾,加 @ 表群組, @shsps 表 s94 這個群組,當然系統內需要預先建有 s94 這個群組 111cn.net
write list = sysadm,@shsps
force create mode = 0755

[share]
comment = 資源分享
path = /home/share
valid users = sysadm,@shsps
write list = sysadm
force create mode = 0755

設定檔檢查:testparm

建立 homework、share 資料夾和修改許可權

mkdir /home/homework /home/share
chmod 777 /home/homework
chmod 755 /home/share
chown sysadm.sysadm /home/homework /home/share

新增 sysadm 帳號的 samba 密碼

smbpasswd -a sysadm
more /etc/samba/smbpasswd

啟動 samba :
/etc/rc.d/init.d/smb start
chkconfig smb on

測試: 在 Windows XP 下開啟檔案總管:\IP
 
FreeNAS
若是只要當網路芳鄰的資料伺服器,建議可以用簡單、方便的Freenas。

官方網站:http://freenas.org/doku.php

下載套件:FreeNAS-i386-embedded-0.7.1.5127.img
準備裝置:

1.舊主機一部
2.網卡
3.隨身碟(開機)一個,大硬碟(資料)一~二個。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.