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.随身碟(开机)一个,大硬碟(资料)一~二个。