Ubuntu下配置Samba服务器

为了让Linux和Windows能更方便的共享文件。

首先感谢这篇文章的帮助:http://linuxwind.javaeye.com/blog/319315

1、安装smba smbfs

sudo apt-get install samba smbfs

2、创建共享目录,或是找已经存在的文件夹,只要权限放开就行了
mkdir /home/share
sudo chmod 777 /home/share
chown share:share /home/share

3、配置samba
# sudo gedit /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
security = user
server string = liheyuan 's Samba
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
在smb.conf最后添加不同的share,share可以被liheyuan或share访问,liheyuan只能被liheyuan访问。
[share]
available = yes
browsealbe = yes
public = yes
writable = yes
[liheyuan]
path = /home/liheyuan
valid users = liheyuan
available = yes
browsealbe = yes
public = no
writable = yes
 

4、创建samba帐户
#sudo touch /etc/samba/smbpasswd
#sudo smbpasswd -a share
会要求你输入samba帐户的密码

5、现在在WinXP下就能够访问了,用share可以读写

Leave a Reply

Your email address will not be published.