2

i have an external hard drive connect to my TP-Link router and shared using USB Share, i am unable to connect to this Share from Ubuntu, i can only see shared volumes but can't gain access. I can connect to it from Windows and even from my Android device using X-plore File Manager. What can i do ?

My router is old and it supports only SMBv1 shares.

5
  • Whats the error when you enter the password? Commented Dec 18, 2018 at 11:12
  • @jamalm noting just same dialog reopens and asks me to enter user and password again Commented Dec 18, 2018 at 11:59
  • It could be that you are entering the wrong password. The GUI doesn't tell you when you entered the wrong credentials, try to enter a wrong password to confirm my suspicion, it will probably just pop up again aswell. Try to create a new user from the TP-Link so you are sure of the password. According to the second image it states in the right-hand side that the passwords are not displayed for security reasons so chances are that the passwords there aren't the real passwords. Commented Dec 18, 2018 at 12:13
  • 1
    i am using the guest user account on my android device as well as Windows and it is working ! Commented Dec 18, 2018 at 12:16
  • Okay well that is strange. I'm going to detail an answer with steps to mount the smb share through the fstab file. Do try it and let me know the results. You will need root access to edit this file. Commented Dec 18, 2018 at 12:21

2 Answers 2

1

Try to mount the smb share through your fstab file. You will need root access to do this. Start by opening a command line terminal and typing su -. If you do not know the root password try sudo su - and enter your own user account's password.

Open the /etc/fstab file through gedit or whatever text editor you are comfortable with, we'll go with gedit because its the default on ubuntu: gedit /etc/fstab.

Go to the end of the file on a new line and enter the following:

//192.168.0.254/volume1 /media/windowsshare cifs username=user,password=pass 0 0

substituting user and pass with the username and the password you used to log in. You can also substitute windowsshare with whatever name you wish.

Now save and exit the editor. Navigate to /media/ and create the folder that you named in the fstab, so in our case here we do the following:

  • cd /media

  • mkdir /media/windowsshare

Now try to mount the share from the fstab by typing:

mount -a

This command tells ubuntu: "Mount all filesystems defined in /etc/fstab" so it should pick up the new entry.

If there are no errors, we are golden! If there are, do let me know.

A common error could be that Ubuntu does not have mount.cifs. In this event go back to the terminal (as root) and type apt-get install cifs-utils. This will allow you to mount smb shares onto your system.

To find the files in your file browser go to File System -> media -> windowsshare.

6
  • it didn't work i get this error : mount error(112): Host is down Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) Commented Dec 18, 2018 at 12:54
  • 1
    try adding vers=1.0 to the /etc/fstab file so: //192.168.0.254/volume1 /media/windowsshare cifs vers=1.0,username=user,password=pass 0 0 Commented Dec 18, 2018 at 13:11
  • 1
    thanks it is working fine now. will it be auto mounted after reboot ? Commented Dec 18, 2018 at 13:15
  • 1
    last thing the share didn't automount on reboot i have to add x-systemd.automount to fstab, but now it see the mount both under Devices (as a hard drive) and Network (as folder), can i change this ? Commented Dec 19, 2018 at 17:22
  • 1
    I'm not too sure on the x-systemd.automount inside the fstab, i've never had to do something like that. As for the double appearance, it will appear under Devices because you have it mounted through the FileSystem Table (fstab) and it will appear over the network because it is available over the network. IT shouldn't cause any issues. Just ignore the network one and things should be fine. I don't think you can remove it from Network explicitly, not as far as i know at least.. hope this helps Commented Dec 20, 2018 at 10:51
1

Had the same problem many times with TPLink routers, they really don't do Linux. The below is from my Archer VR600 set up, but very similar worked with a 8980

I mount my drive with an alias in my ~/.bashrc file

alias mount-smb='mount -t cifs //192.168.1.1/volume\(sda1\) /mnt -o vers=1.0' 

Confusingly the volume is called 'volume(sda1)', despite there being no support for Linux, hence the escaping of the parentheses in the bash command.

Then even more confusingly the drive is listed in the router setup as G: which can be ignored, it is not even used in windoze.

You need to access your router in advanced mode and check exactly what the volume name is, it varies wildly between different models and firmware versions.

This command mounts to /mnt and specifies version 1.0 to ensure compatibility.

You will be asked for the password for the account you set up when enabling smb access to the USB drive.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.