|  About Me  |  Blogs  |  Photos  |  Publications  |  Resume  | 

Setup Samba for accessing windows folders

We’ve setup smbclient on the linux laptop to mount shared folders on the remote windows machine.

First install smbclient in linux. Then on the windows machine enable sharing under properties of the folders you want to share, set password and change username to single word if necessary (linux doesn’t like username containing spaces).

Now in linux check the list of shared resources on the windows host with:

$ smbclient -L <hostname>

You should see the folder you’ve just shared. Then try connecting to the resource by:

$ smbclient //<hostname>/<resource> -U <username>
e.g.
$ smbclient //rabbit/shared$ -U anniec

It should prompt you for the password and log you into the folder.

Try mounting the folder:

$ mkdir /mnt/rabbits
$ mount -t smbfs -o rw,user,noauto,username=anniec,password=xxxxxx  //rabbit/shared$ /mnt/rabbits # check syntax

Now we add it in fstab

//rabbit/shared$        /mnt/rabbits    smbfs   rw,user,noauto,username=anniec,password=xxxxxx

Try

$ mount /mnt/rabbits
$ ls /mnt/rabbits

See your files in windows?

Leave a Reply

You must be logged in to post a comment.