Mounting over Samba (SMBFS)

If you want to get one Ubuntu box talking to another and have the shares mounted, then this is what you do.

Say that Box1 has a Downloads folder that you’d like to have available on Box2. Follow these steps:

  1. On Box2, apt-get install smbfs
  2. On Box2, create a mount point (e.g. /media/Downloads) and edit /etc/fstab.
  3. Add the line //Box1/Downloads /media/Downloads smbfs credentials=/etc/samba/.cred-file,gid=users,dmask=775,uid=USERNAME 0 0
  4. Create /etc/samba/.cred-file and add the lines:

    username=USERNAME
    password=PASSWORD

    obviously replacing with the correct values.

  5. sudo mount -a

You should be sorted.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s