Unable to connect to SMB share on ASUS router

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
fattage

Unable to connect to SMB share on ASUS router

Post by fattage »

I have an ASUS RT-86U, the default firmware doesn't support SMB2+ so I flashed asuswrt-merlin which supports SMB2. However no matter what I find online I am unable to access the share on mint 19.2. Keep in mind I'm trying to mount the entire drive. It works fine in windows.

Code: Select all

//192.168.50.1 /media/SHARE cifs credentials=/home/USER/.smbcredentials,uid=1000 0 0
doesn't work in fstab settings keep getting error: mount error(22): Invalid argument; Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Mounting directly doesn't work with

Code: Select all

sudo mount //192.168.50.1 /media/SHARE -o username=USER
I've tried adding the following after the workgroup setting in /etc/samba/smb.conf

Code: Select all

client NTLMv2 auth = no
   client use spnego = no
Everything I have found online say that one of those should work. I must be missing something
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.
User avatar
Spearmint2
Level 16
Level 16
Posts: 6900
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: Unable to connect to SMB share on ASUS router

Post by Spearmint2 »

Open Disks program, have it install a line for that partition into the fstab file.
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Unable to connect to SMB share on ASUS router

Post by phd21 »

Hi fattage,

I just read your post and the good replies to it. Here are my thoughts on this as well.

It would help to know more about your system setup. If you run "inxi -Fxzd" and "lsusb" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

Can you access your drive connected to your router using this samba address in your file manager?
smb://192.168.50.1

Code: Select all

smb://192.168.50.1

Recent posts:

4.15 and the SMB bug
viewtopic.php?f=61&t=302142

Samba Networking and Linux firewall questions <Solved> - Linux Mint Forums
viewtopic.php?f=157&t=302266

Hope this helps ...
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
altair4
Level 20
Level 20
Posts: 11460
Joined: Tue Feb 03, 2009 10:27 am

Re: Unable to connect to SMB share on ASUS router

Post by altair4 »

fattage wrote: Mon Sep 30, 2019 7:41 pm I have an ASUS RT-86U, the default firmware doesn't support SMB2+ so I flashed asuswrt-merlin which supports SMB2. However no matter what I find online I am unable to access the share on mint 19.2. Keep in mind I'm trying to mount the entire drive. It works fine in windows.

Code: Select all

//192.168.50.1 /media/SHARE cifs credentials=/home/USER/.smbcredentials,uid=1000 0 0
doesn't work in fstab settings keep getting error: mount error(22): Invalid argument; Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Mounting directly doesn't work with

Code: Select all

sudo mount //192.168.50.1 /media/SHARE -o username=USER
I've tried adding the following after the workgroup setting in /etc/samba/smb.conf

Code: Select all

client NTLMv2 auth = no
   client use spnego = no
Everything I have found online say that one of those should work. I must be missing something
There's a bunch of things wrong with your post:

[1] Incorrect syntax in your fstab declaration.

You can't mount a server. You can only mount a share on that server. So your line should look something like this:
//192.168.50.1/SHARE /media/SHARE cifs credentials=/home/USER/.smbcredentials,uid=1000 0 0
Replace SHARE with whatever the share name is in the router.

[2] Incorrect syntax in your manual mount declaration.

Same problem as above + you didn't specity the type of mount so the line should look like this:
sudo mount -t cifs //192.168.50.1/SHARE /media/SHARE -o username=USER
[3] Editing smb.conf may or may not have an affect when accessing the share from the file manager but it will have no affect on a cifs mount since mount.cifs does not know smb.conf exists.

Note1: mount.cifs in the Linux kernel you are using will attempt to connect to a server using SMBv2.1 up to SMBv3.11. If the update to your router only uses SMBv2 but not SMBv2.1 that may be a problem.

I would suggest doing a series of manual mounts to determine the best way to connect:
sudo mount -t cifs //192.168.50.1/SHARE /media/SHARE -o username=USER,vers=2.0
sudo mount -t cifs //192.168.50.1/SHARE /media/SHARE -o username=USER,vers=1.0
Note2: Keep in mind I'm trying to mount the entire drive. It works fine in windows.
No it doesn't. The equivalent of a cifs mount in Windows is a "mapped network drive mount" and you can't mount an entire server in Windows either:
WinMap.png
Note3: Maybe it's just me but that ip address just doesn't look right. Are your sure it's not 192.168.1.50 or better yet 192.168.1.1 ?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
fattage

Re: Unable to connect to SMB share on ASUS router

Post by fattage »

phd21 wrote: Mon Sep 30, 2019 9:20 pm Hi fattage,

I just read your post and the good replies to it. Here are my thoughts on this as well.

It would help to know more about your system setup. If you run "inxi -Fxzd" and "lsusb" from the console terminal prompt, highlight the results, copy and paste them back here, that should provide enough information.

Can you access your drive connected to your router using this samba address in your file manager?
smb://192.168.50.1

Code: Select all

smb://192.168.50.1

Recent posts:

4.15 and the SMB bug
viewtopic.php?f=61&t=302142

Samba Networking and Linux firewall questions <Solved> - Linux Mint Forums
viewtopic.php?f=157&t=302266

Hope this helps ...
I will get that information back as soon as I get home this evening. I was able to open the drive using file explorer and smb://192.168.50.1
altair4 wrote: Tue Oct 01, 2019 6:43 am There's a bunch of things wrong with your post:

[1] Incorrect syntax in your fstab declaration.

You can't mount a server. You can only mount a share on that server. So your line should look something like this:
//192.168.50.1/SHARE /media/SHARE cifs credentials=/home/USER/.smbcredentials,uid=1000 0 0
Replace SHARE with whatever the share name is in the router.

[2] Incorrect syntax in your manual mount declaration.

Same problem as above + you didn't specity the type of mount so the line should look like this:
sudo mount -t cifs //192.168.50.1/SHARE /media/SHARE -o username=USER
[3] Editing smb.conf may or may not have an affect when accessing the share from the file manager but it will have no affect on a cifs mount since mount.cifs does not know smb.conf exists.

Note1: mount.cifs in the Linux kernel you are using will attempt to connect to a server using SMBv2.1 up to SMBv3.11. If the update to your router only uses SMBv2 but not SMBv2.1 that may be a problem.

I would suggest doing a series of manual mounts to determine the best way to connect:
sudo mount -t cifs //192.168.50.1/SHARE /media/SHARE -o username=USER,vers=2.0
sudo mount -t cifs //192.168.50.1/SHARE /media/SHARE -o username=USER,vers=1.0
Note2: Keep in mind I'm trying to mount the entire drive. It works fine in windows.
No it doesn't. The equivalent of a cifs mount in Windows is a "mapped network drive mount" and you can't mount an entire server in Windows either:
WinMap.png
Note3: Maybe it's just me but that ip address just doesn't look right. Are your sure it's not 192.168.1.50 or better yet 192.168.1.1 ?
So on windows I am able to open the drive just by putting \\192.168.50.1 or \\(routername) or just by opening network and it shows up as available computer kind of like my laptop does just as my router name. So I thought it should work similarly on here.

Now my router gives the path as "//192.168.50.1/WD Elements 25A2/Elements" now it gives the option to remove the drive name in the share which I selected yes which I think removes the elements folder? It also give the option to have it work like a WINS server which is select as yes also "force as Master Browser", not sure what that is, is off

I'm sorry but I am a newish to linux, I couldn't find out how to do path quotes. for example

Code: Select all

sudo mount -t cifs "//192.168.50.1/WD Elements 25A2" /media/SHARE
I do have further folders after elements like Movies, music, backup but Ideally I want to be able to see all of those at once.

192.168.50.1 is correct, I thought it was odd too at first but apparently ASUS changed their default IP.

I will attempt those examples you provided, again not sure what folder to put after the IP I think is part problem.
Spearmint2 wrote: Mon Sep 30, 2019 8:28 pm Open Disks program, have it install a line for that partition into the fstab file.
I will take a look at that.
Locked

Return to “Networking”