Cannot setup Network NAS Mount in /home

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Cannot setup Network NAS Mount in /home

Post by Tazzin »

Ok guys I'll try to keep this as short as I can.. I'm a semi-newb to linux and trying to figure this out but I just spent 8 hours research and trying things to no resolution.

In my home I have an Asus Router with USB Networked Storage. This works as expected in Windows 11 and Linux Mint 21 UI (via smb connection).

Now in Linux Mint 21 UI in the 'Files' browser window, where it shows directories and drives on left for navigation and main windows shows its' containing contents the 'Networking' section of the navigation section allows me to get to the shared USB drive on the router, this all works via UI. In the UI is shows as this in address bar...
smb://rt-ax86u-11d8/download2 (at asus_nas)/


Now I have KeepassXC that CANNOT see any networked connections in Linux Mint or this would have been extremely easy to get to. SO I was wanting to try and mount this networked shared USB in my /home/<user>/ASUS_NAS location (which I have already created and ready). I have looked and tried MANY different option from adding something /etc/fstab to testing a simple mount in the terminal. I always run into errors. i.e.
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
mount: /etc/fstab: parse error at line 21 -- ignored
mount error: could not resolve address for rt-ax86u-11d8: Unknown error

I have tried MANY variations of:
sudo mount.cifs "smb://rt-ax86u-11d8/download2 (at asus_nas)/" /home/<user>/ASUS_NAS -o user=**********,password=**********,sec=ntlm,uid=1000,nounix

I have tried many variations of:
sudo mount -t cifs //192.168.***.1/download2 /home/<user>/ASUS_NAS -o user=**********,password=************,sec=ntlm,uid=1000,nounix

Yes I know that 'smb' and cifs doesn't work together, but I'm trying everything I know to try.

I need major help and someone that can walk me through step-by-step to either troubleshoot and/or setup a 'mounted network NAS drive' in my /home (if this is even possible) so that KeePassXC can access, open, modify & save a networked source file from with my profile location that it 'can' see.. ANY help at this point is appreciated... Thanks in advance.
Last edited by LockBot on Tue Feb 14, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Cannot setup Network NAS Mount in /home

Post by AndyMH »

Your smb mount is looking for download2 (at asus_nas) but with cifs you are using download2? I avoid spaces in my network shares - messy, you have to quote everything.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

I have tried many variations of:
sudo mount -t cifs //192.168.***.1/download2 /home/<user>/ASUS_NAS -o user=**********,password=************,sec=ntlm,uid=1000,nounix
By default cifs will mount with sec=ntlmssp and automatically choose the best smb dialect from SMB2.1 all the way up to SMB3.X.

Adding sec=ntlm is inconsistent with >= SMB2.1.

If your NAS can only be accessed with SMB1 where a sec=ntlm is appropriate you also need to specify that smb dialect in your mount expression with a vers=1.0:
sudo mount -t cifs //192.168.***.1/download2 /home/<user>/ASUS_NAS -o user=**********,password=************,vers=1.0,sec=ntlm,uid=1000,nounix
See if that works better. And use the ip address since your router - at least from the LAN side of things - has an IP that is static.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

altair4 wrote: Sun Aug 14, 2022 9:13 am
I have tried many variations of:
sudo mount -t cifs //192.168.***.1/download2 /home/<user>/ASUS_NAS -o user=**********,password=************,sec=ntlm,uid=1000,nounix
By default cifs will mount with sec=ntlmssp and automatically choose the best smb dialect from SMB2.1 all the way up to SMB3.X.

Adding sec=ntlm is inconsistent with >= SMB2.1.

If your NAS can only be accessed with SMB1 where a sec=ntlm is appropriate you also need to specify that smb dialect in your mount expression with a vers=1.0:
sudo mount -t cifs //192.168.***.1/download2 /home/<user>/ASUS_NAS -o user=**********,password=************,vers=1.0,sec=ntlm,uid=1000,nounix
See if that works better. And use the ip address since your router - at least from the LAN side of things - has an IP that is static.
Please note I have tried vers=1.0, vers=2.0, vers=2.1, vers=3.0 ... all with the same error below...

Please also note, that I have tried MANY variations of what you suggested per what I found online in my 8 hours of trial and error :D

I believe I'm down ensuring I have the 'right information' to make the connection. So if anyone wants to take the the time to provide suggestions to query for the information, I'm all game for learning ;)...

BTW thanks altair4 for the suggestion..


sudo mount -t cifs //192.168.***.1/download2 /home/<user>/ASUS_NAS -o user=*********,password=********,vers=1.0,sec=ntlm,uid=1000,nounix
[sudo] password for <user>:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

AndyMH wrote: Sun Aug 14, 2022 4:04 am Your smb mount is looking for download2 (at asus_nas) but with cifs you are using download2? I avoid spaces in my network shares - messy, you have to quote everything.
Yes I know this has spaces, this is the way it is per the UI that indicated. Again, i have been researching and trying things for 8 hours ;).. do you have any suggestions on how to add this?

Image
Attachments
08-14-2022 09_53_52-000133.png
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

Just out of curiosity which dialects of smb can ASUS handle:

Install nmap

Code: Select all

sudo apt install nmap
Run this command pointing to the ip address of the device:

Code: Select all

nmap --script smb-protocols 192.168.***.1
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

altair4 wrote: Sun Aug 14, 2022 11:40 am Just out of curiosity which dialects of smb can ASUS handle:

Install nmap

Code: Select all

sudo apt install nmap
Run this command pointing to the ip address of the device:

Code: Select all

nmap --script smb-protocols 192.168.***.1
I'm executing this but appears to be taking a while:
nmap --script smb-protocols 192.168.50.1
Starting Nmap 7.80 ( https://nmap.org ) at 2022-08-14 12:59 CDT

Ok my apologies, it took a few minutes:
Nmap scan report for RT-AX86U-11D8 (192.168.50.1)
Host is up (1.0s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
53/tcp open domain
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
8081/tcp open blackice-icecap
8200/tcp open trivnet1
8443/tcp open https-alt

Host script results:
| smb-protocols:
| dialects:
| NT LM 0.12 (SMBv1) [dangerous, but default]
|_ 2.02

Nmap done: 1 IP address (1 host up) scanned in 102.72 seconds
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

And if you run the following command in a terminal does it actually show downloads2 (.....)

Code: Select all

smbclient -L 192.168.50.1
EDIT: Sorry, I forgot your nas requires credentials:

If the above doesn't work pass the user name the nas is expecting:

Code: Select all

smbclient -L 192.168.50.1 -U *****
Where ***** is the user name on the nas.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

altair4 wrote: Sun Aug 14, 2022 2:20 pm And if you run the following command in a terminal does it actually show downloads2 (.....)

Code: Select all

smbclient -L 192.168.50.1
EDIT: Sorry, I forgot your nas requires credentials:

If the above doesn't work pass the user name the nas is expecting:

Code: Select all

smbclient -L 192.168.50.1 -U *****
Where ***** is the user name on the nas.

Sharename Type Comment
--------- ---- -------
Download2 (at ASUS_NAS) Disk ASUS_NAS's Download2 in SanDisk Ultra Fit
IPC$ IPC IPC Service (RT-AX86U)
SMB1 disabled -- no workgroup available

Image
Attachments
08-14-2022 14_03_34-000134.png
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

Damn.
Can I assume you already tried this: - put quotes around the entire remote location:

Code: Select all

sudo mount -t cifs "//192.168.50.1/download2 (at asus_nas)"  /home/<user>/ASUS_NAS -o user=**********,password=************,vers=1.0,sec=ntlm,uid=1000,nounix
If that works it's going to take me a bit to translate that into something fstab can use.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

Yes sir, I believe I have already tried BUT I did run again, just to be safe and I got the mount error (22) again.. please note I'm leaving all but the password in for security reasons so you can see ...

sudo mount -t cifs "//192.168.50.1/download2 (at asus_nas)" /home/parrish/ASUS_NAS -o user=*****,password=*****,vers=1.0,sec=ntlm,uid=1000,nounix
[sudo] password for parrish:
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

OK, I can reproduce this.

Linux kernel 5.15 removed sec=ntlm which I suspect is the "invalid augment"

You may have already been through this but remove sec=ntlm from your mount command.

Then try with either vers=1.0 or better yet vers=2.0 without any sec reference.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

HOLY TOLEDO!!!!!!!!! Removing the ... sec=ntlm... worked!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


So the command that worked is:

sudo mount -t cifs "//192.168.50.1/download2 (at asus_nas)" /home/parrish/ASUS_NAS -o user=*******,password=*********,vers=1.0,uid=1000,nounix


Now what I would 'LIKE' to do is add it to /etc/fstab file to load up when I boot into linux mint. Do you know the correct way to add that? I'm going to do some research to see the correct syntax for that.

THANK YOU SO MUCH!!!!!!! :D I have been racking my brain over this...
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

I warned you it would take a bit ...........

fstab is really persnickety about how things are defined as it doesn't like literal spaces or special characters ( like ( or )) in the paths of things. So you have to represent them with the octal version of an ascii character:

Spaces are represented by \040
( is represented by \050
) is represented by a \051

So something like this:
//192.168.50.1/download2 (at asus_nas)
Becomes in fstab this:
//192.168.50.1/download2\040\050at\040\asus_nas\051

Now you know why AndyMH likes to keep things simple.

Let's try this the safest way possible:

Edit /etc/fstab and enter this line:

Code: Select all

//192.168.50.1/download2\040\050at\040\asus_nas\051  /home/parrish/ASUS_NAS cifs user=*******,password=*********,vers=1.0,uid=1000,nounix,noauto,user 0 0
Then save the file.

If the share is currently mounted unmount it:

Code: Select all

sudo umount ASUS_NAS
When you open your file manager since you are mounting it in your home directly you should see a ASUS_NAS link on the left side panel. Selecting that link will mount the share per fstab.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

So I added the line in /etc/fstab
reboot (ASUS_NAS was not already mounted anyways)
The mount didn't show the files in /home/parrish/ASUS_NAS
I DO, however, see 'ASUS_NAS' in file browser windows in left nav pain but when I click on it I get:
Unable to mount ASUS_NAS
mount.cifs: permission denied: no match for /home/parrish/ASUS_NAS found in /etc/fstab

I double check the line to ensure I didn't mess up anything.. it is your equivalent.
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

Do you have the actual user name and password in fstab?
You might want to verify the line:

Code: Select all

cat /etc/fstab | grep cifs
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

cat /etc/fstab | grep cifs
//192.168.50.1/download2\040\050at\040\asus_nas\051 /home/parrish/ASUS_NAS cifs user=plm,password=********,vers=1.0,uid=1000,nounix,noauto,user 0 0
altair4
Level 20
Level 20
Posts: 11459
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot setup Network NAS Mount in /home

Post by altair4 »

In trying to reproduce you error a I actually created a test share test (at asus_nas) and the syntax I provided works for me.

Not sure why it's an issue for you but ... um ... I'm running out of power here - it's a long story.

I'll try again tomorrow, sorry.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

What about using the HEX for the character set? i.e. 20 for space?

cat /etc/fstab | grep cifs
//192.168.50.1/download2\20\050at\20\asus_nas\051


Decimal Octal Hex Character Remark
32 040 20
Tazzin
Level 1
Level 1
Posts: 23
Joined: Sat Aug 13, 2022 10:06 pm

Re: Cannot setup Network NAS Mount in /home

Post by Tazzin »

LOL no worries bratha, i totally appreciate what you have helped me with... this gives me a jump start.. I'll continue to research...

Again.. THANK YOU!!! ;)

I do have to work tomorrow so I won't back to trying this stuff until after I get off work after 4pm CST...
Locked

Return to “Storage”