step 1
install samba
sudo apt-get install samba
sudo apt-get install smbfs
step 2
backup the samba config file
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo vim /etc/samba/smb.conf
search "; security = user" line modify as follow:
security = user
username map = /etc/samba/smbusers
step 3
add follow end of the smb.conf file :
[UbuntuShare]
comment = local server samba share
path = /home/newsfan
browseable = yes
read only = no
available = yes
valid users = newsfan
step 4
modify [globle] as follow :
workgroup = WORKGROUP
display charset = UTF-8
unix charset = UTF-8
dos charset = cp936
step 5
sudo useradd newsfan
sudo smbpasswd -a newsfan // create newsfan samba passwd
sudo vim /etc/samba/smbusers // add smbuser
newsfan = "network newsfan"
step 6
sudo testparm
sudo /etc/init.d/smbd restart
windows xp or windows 7 disconnect samba server use follow cmd
net use * /del
解决samba 无法访问软连接的问题
在配置文件的“[global]”节的最后,加上下面三条设置:
follow symlinks = yes
wide links = yes
unix extensions = no
然后保存退出,最后重启下samba即可