[SOLVED] How to change the mounting point of samba shares?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
sfolter

[SOLVED] How to change the mounting point of samba shares?

Post by sfolter »

I have two samba shares on the network, which I mounted through the mount function in Nemo. Currently the mount point for the first share is here: /run/user/sfolter/gvfs/smb-share:server=dd-wrt,share=h/
How to mount this share to a different folder? For example /media/h/
Thank you for your help. :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11454
Joined: Tue Feb 03, 2009 10:27 am

Re: How to change the mounting point of samba shares?

Post by altair4 »

You can't - at least not using Nemo, Connect to Server, or Gigolo because they all use gvfs and that's where the developers wanted it to mount. You can create a symlink to /media so that it ends up as /media/gvfs/smb-share:server=dd-wrt,share=h/ but that's not saving you much.

The only way to specify something like /media/h is to do it manually, something like this:

Code: Select all

sudo mount -t cifs -o username=user-name,password=secret,dir_mode=0777,file_mode=0666,nounix //dd-wrt/h /media/h
And in fstab it would look like this:

Code: Select all

//dd-wrt/h /media/h cifs username=user-name,password=secret,dir_mode=0777,file_mode=0666,nounix 0 0
Make sure the mount point exists:

Code: Select all

sudo mkdir /media/h
And make sure cifs is installed:

Code: Select all

sudo apt-get install cifs-utils
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
sfolter

Re: How to change the mounting point of samba shares?

Post by sfolter »

I was trying to execute this command earlier, but guess what - I haven't installed cifs-utils :lol:
Also when I add just dd-wrt, it can't resolve the name so I put the IP address. Maybe to make this work I have to put the IP and name in /etc/hosts
But anyway, now everything is working as I wanted. Thank you for your fast response and help. :)
Locked

Return to “Beginner Questions”