Setting up a cifs share in Ubuntu 11.04

I’m connecting to Windows SBS 2011, but it should work in other versions of Windows to.  First, you’ll need the server IP, share name, and credentials to access the share if required.

Then:

  1. apt-get install smbfs
  2. Create the directory on your machine you’ll like the share to be linked to
  3. vi /etc/fstab, and add the following to the end:
    //[SERVER_IP]/[SHARE_NAME]     /[LOCAL_SHARE_FOLDER]    cifs    uid=[YOUR_LOCAL_USERNAME],credentials=/etc/cifspw,_netdev     0       0
  4. vi /etc/cifspw, and add the credentials to access the share (windows user account)
    username=Name
    password=Password
  5. chmod 600 /etc/cifspw
  6. mount -a

If successful, there will be no errors/messages when you use the mount -a command, and the share will be visible from Nautilus / wherever you mounted it.

Leave a Reply

Your email address will not be published. Required fields are marked *