Greetings,
Working as system admin and maintaining some old computers in my work place I have installed Mint 19 Cinnamon desktop on a client desktop since its a lightweight OS and still modern and very functional for all the tasks that a user needs but i came across a small issue when i had to "mount" some network volumes (SMB volumes).
We use a NAS device where the most users work with their files and so many clients desktops must have permantly mounted 3 or 4 SMB volumes/partitions of the NAS device.
However when i mount (even temporary) a SMB volume i cant rename it and i dont want the users to be able to the ip address of the SMB volume on the shortcut on the desktop or on the file manager since the name of the mounted smb volume contains the ip of the nas.
What can i do so i can mount permantly (even after a reboot of the pc) these volumes of my NAS device and with the names that i like.
Thank you in advance!
Rename a SMB volume on Mint 19
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Rename a SMB volume on Mint 19
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Rename a SMB volume on Mint 19
You might not want them to automount.
Give this a shot: On Demand CIFS Mounting of Shares
The concept here is you create a mount point under /media or the users home directory and use cifs not gvfs ( which the file manager uses ). Then the name of the share displayed in the file manager will match the name of the mount point.
The process described above is a mount on demand not an automount. You can convert it to a true automount by ignoring the last step - remove the noauto,user options but that is a tricky thing to pull off in Mint because it takes so long for the network stack to initialize in Mint. Same thing happens in Ubuntu just not to the degree it happens in Mint..
Give this a shot: On Demand CIFS Mounting of Shares
The concept here is you create a mount point under /media or the users home directory and use cifs not gvfs ( which the file manager uses ). Then the name of the share displayed in the file manager will match the name of the mount point.
The process described above is a mount on demand not an automount. You can convert it to a true automount by ignoring the last step - remove the noauto,user options but that is a tricky thing to pull off in Mint because it takes so long for the network stack to initialize in Mint. Same thing happens in Ubuntu just not to the degree it happens in Mint..
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Rename a SMB volume on Mint 19
Thank you so much for your detailed explanation and this so helpful guide! It's interesting and it helped me a lot also that you mention that on 4.13++ kernel of linux smb protocol v3 is the default and so if our NAS smb is a bit older (in our organisation it supposrts version 1 of smb) we have manually to add as well the parameter of vers=1.
However still my problem is that although now when i mount a nas volume/folder i have friendly names on them without the ip of my nas being displayed on the icons of file manager still when i reboot the computer and even if i have add on fstab these volumes as the guide is pointing i cant access them but only if i mount them again from terminal the /media/nameofnasvolume
Any idea why is this happening?
I am attaching a screenshot of my /etc/fstab and one of the command that i am using on terminal to mount them successfully.
As you can see just for experiment i havent the parameter "noauto" on one line but still...
thank you so much in advance
However still my problem is that although now when i mount a nas volume/folder i have friendly names on them without the ip of my nas being displayed on the icons of file manager still when i reboot the computer and even if i have add on fstab these volumes as the guide is pointing i cant access them but only if i mount them again from terminal the /media/nameofnasvolume
Any idea why is this happening?
I am attaching a screenshot of my /etc/fstab and one of the command that i am using on terminal to mount them successfully.
As you can see just for experiment i havent the parameter "noauto" on one line but still...
thank you so much in advance
Re: Rename a SMB volume on Mint 19
That should not be happening. You never have to use the terminal with my approach. All you have to do is click on the link on the side panel of your file manager.even if i have add on fstab these volumes as the guide is pointing i cant access them but only if i mount them again from terminal the /media/nameofnasvolume
Maybe it is the space you have in your fstab statement between noauto and ,user on one and vers=1.0 and ,user on the other.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Rename a SMB volume on Mint 19
I had a chance to revisit this on my own system and I can remove the "Maybe" in my previous post.
I use the this method on my own system and this line in fstab works just as I described in the HowTO:
** A mount "link" appears on the side panel of my file manager labeled
** Clicking on that link mounted the Win10 share.
Now I edited that fstab line to insert a space between
** There is no mount "link" on the side panel.
** There is nothing to click to mount the share.
If I run mount it tells me there is something wrong with the syntax:
I use the this method on my own system and this line in fstab works just as I described in the HowTO:
Code: Select all
//vwin10.local/shared /media/Win10Shared cifs username=smbuser,password=smbuserpw,uid=1000,iocharset=utf8,noauto,user 0 0
Win10Shared
** Clicking on that link mounted the Win10 share.
Now I edited that fstab line to insert a space between
noauto
and user
:
Code: Select all
//vwin10.local/shared /media/Win10Shared cifs username=smbuser,password=smbuserpw,uid=1000,iocharset=utf8,noauto, user 0 0
** There is nothing to click to mount the share.
If I run mount it tells me there is something wrong with the syntax:
Deleting the space before user eliminated the problem.altair@xub1804:~$ sudo mount -a
mount: /etc/fstab: parse error at line 34 -- ignored
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Rename a SMB volume on Mint 19
Thank you so much for walkthroughing me on this and for your time that you spend to check it.
I did as you pointed out though i am still taking a error on the line 12 (the first volume of my smb nas). Line 13 (second volume on the smb) seems to be fine.
I even copy pasted your correct line making of course the right changes on the ip of my nas , and the password and username of the client pc making sure no spaces are added.
I did as you pointed out though i am still taking a error on the line 12 (the first volume of my smb nas). Line 13 (second volume on the smb) seems to be fine.
I even copy pasted your correct line making of course the right changes on the ip of my nas , and the password and username of the client pc making sure no spaces are added.
Re: Rename a SMB volume on Mint 19
Additionally i was thinking if it has to do something with the user id that the user protokollo_3 has on the NAS device (Thecus) since its different from the user id that the protokollo_3 has in the linux mint client pc.
As you can see from the screenshot on Thecus NAS the PROTOKOLLO_3 user is having a ID 1059.
As you can see from the screenshot on Thecus NAS the PROTOKOLLO_3 user is having a ID 1059.
Re: Rename a SMB volume on Mint 19
Not sure why I didn't notice this before but you have another syntax error. I cannot reproduce your same characters but something like this is incorrect:
That is not the way you declare a path with spaces in fstab. For every space you need to insert
No quotes
Code: Select all
//10.96.255.42/'name of folder' /media/'name of folder' ....
\040
. So the line would look like this:
Code: Select all
//10.96.255.42/name\040of\040folder /media/name\040of\040folder
'
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Rename a SMB volume on Mint 19
Thank you so much! Now it works like a charm
It was indeed a nice experience to learn some more about smb configurations on linux! (Though that with the spaces was a bit tricky!)
At a point i was so dissapointed that i was looking for other tricks to make the mounting on these smb volumes to work like using crotab feature @reboot line and execute from there the mount commants each time on the boot or even edit rc.local config file (although on mint 19 is inactive due to SystemD wayof handling the process).
It was indeed a nice experience to learn some more about smb configurations on linux! (Though that with the spaces was a bit tricky!)
At a point i was so dissapointed that i was looking for other tricks to make the mounting on these smb volumes to work like using crotab feature @reboot line and execute from there the mount commants each time on the boot or even edit rc.local config file (although on mint 19 is inactive due to SystemD wayof handling the process).