Jason’s Ranting & Raving

Those who don’t read have no advantage over those who can’t.

Archive for April, 2013

Mounting a Synology drive on Ubuntu Linux

Posted by jaystile on April 26, 2013

I was having a little trouble mounting my Synology network drive as described on the wiki. This is was on a clean installation of Ubuntu Linux 12.10.

These are the steps I took to figure out what was going on. First I had to find the IP address of the drive on my network. So, I downloaded nmap and then scanned my local network.

sudo apt-get install nmap
nmap -O

I found I was have troulbe with just using nfs as I had to use a username and password to connect to the shared drive. I found that using cifs worked for me. I installed it and then tried mounting the drive and it worked! Then I unmounted because I didn’t want to have to do this every time I wanted to access the drive.

sudo mkdir -p /mnt/synology
mount -t cifs -o username=MYUSER,password=***** // /mnt/synology
mount -a
ls -la /mnt/synology
umount /mnt/synology

I decided I wanted a little more permanent solution. So I created incorporated the ‘Basic Method’ steps from the synology wiki. I edited the /etc/fstab with the following:

// /mnt/synology cifs user,uid=yourusername,gid=users,rw,suid,credentials=/etc/cifspwd 0 0

Next was to create to the cifspw file.

sudo su -
echo username=yourusername > /etc/cifspwd
echo password=yourpassword >> /etc/cifspwd
chmod 0600 /etc/cifspwd
mount -a
ls -la /mnt/synology

I hope that works for you!

I built a new PC and had to try something new as my original instructions didn’t work for the fstab and creditials file.
I ran the command

 sudo su -
 dmesg | tail

I noted that there was an error: CIFS VFS: No username specified. After a quick google search some nice person posted a solution. However, it was a touch out of date as the package smbfs was retired and cifs-utils was the recommended package offered by apt-get.

sudo apt-get install cifs-utils

After a restart my mounts came back up correctly,.


Posted in Programming, Solutions | 3 Comments »