Friday, July 18, 2008

Mounting Windows Shares In Ubuntu

Below are the steps needed to make a window share folder available in ubuntu

First, edit your /etc/hosts file and give the Windows machine a name:

192.168.1.2   winpc

Next, install the samba and smbfs packages using your method of choice.

Create a directory where the share will appear on your local filesystem.

$ sudo mkdir /mnt/music

Edit /etc/fstab and add a line for the mount. Here “winpc” is the name of the machine and “music” is the name of the share.

//winpc/music  /mnt/music  cifs exec,credentials=/etc/cifspw 0 0

Create a password file /etc/cifspw with the login credentials for your Windows account.

username=User
password=ThisIsAPassword

And secure the file:

$ sudo chmod 600 /etc/cifspw

Now, Ride the tiger......

$ sudo mount -a

No comments: