Friday, February 13, 2009

Install Samba in Ubuntu

In my ubuntun server in VMWare, I test samba which I use to tranfer file between host XP system with VMware ubuntun server.
First, backup the original config file: /etc/samba/smb.conf like this:
> cd /etc/samba
> sudo cp smb.conf smb.conf.old
> sudo cp smb.conf smb.conf.master
> sudo vi smb.conf.master
Only Add a new share directory [share], don't change other contents.
Create a new subdirectory in your home directory, my home directory is /home/wjh,
I create a subdirectory 'share' under '/home/wjh', and change the access permit:
>cd /home/wjh
>mkdir share
>chmod 666

Edit '/etc/samba/smb.conf.master, add content below:
[share]
read only = no
locking = no
path = /home/wjh/share
guest ok = yes
browseable = yes

run ' testparm -s smb.conf.master >smb.conf '
restart samba server: /etc/init.d/samba restart

In the XP, you can search host, in address bar "//192.xxx.xxx.xxx/share", then you can visist sambar share directory

No comments: