Setup Ubuntu

http://learn.clemsonlinux.org/wiki/Ubuntu:Install_from_USB_drive

root@ang-laptop:/# df

root@ang-laptop:/# fdisk /dev/sdb1

root@ang-laptop:/# partprobe

root@ang-laptop:/# mkfs.ext4 -L LinuxOS /dev/sdb1

root@ang-laptop:/mnt/mnt-dvd# cd /home/ang/UbuntuSetup/

root@ang-laptop:/home/ang/UbuntuSetup# zcat boot.img.gz > /dev/sdb1

Install guest addition

sudo apt-get install virtualbox-ose-guest-utils virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms

How to install Samba in Ubuntu

sudo apt-get install -y samba

sudo apt-get install -y python-glade2

sudo apt-get install -y system-config-samba

vim /etc/samba/smb.conf

    workgroup = WORKGROUP

    unix extensions = no

    wide links = yes

Next, scroll down further till you reach the "Authentication" section. You should see the line:

    security = user

Continue to scroll down further until you reach the "Share Definitions" section.

[homes]

   comment = Home Directories

   browseable = yes

   valid users = %S

   read only = no

   writable = yes

The last line valid users = %S means that only you, or anyone with your login account, can connect to your own Home folder via Samba.

To add additional file sharing path, add the following lines to the end of the file:

[share]

    comment = New Share Path

    path = /path/to/share/folder

    browsable = yes

    guest ok = yes

    read only = no

    create mask = 0755

You can change the "guest ok=yes" line to "guest ok=no" if you want the share path only available for logged in users.

Add samba user

smbpasswd -a keanheong

Check samba configuration

sudo testparm -s

Restart Samba services

sudo service smbd restart

sudo service nmbd restart

How to reset samba to shipment condition

sudo apt-get purge samba samba-common

sudo rm -rf /etc/samba/ /etc/default/samba

sudo apt-get install samba

How to reintall samba (Error : SAMBA Specified Network Name no Longer Available)

apt-get install --reinstall libsmbclient libsmbclient-dev libtevent0 libtalloc2