Need advice for troubleshooting SMB

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page 1, 2  Next
Author Message
Zyxx
DD-WRT Guru


Joined: 28 Dec 2018
Posts: 989

PostPosted: Thu Jun 19, 2025 21:48    Post subject: Need advice for troubleshooting SMB Reply with quote
I cannot figure out how to configure SMB on my DD-WRT Routers to create a restriced folder that works with my PCs (all Linux).
I tested months ago with a Marvel driven device and my MR7350, now I try to get it to work on my X86 DD-WRT Router (all newest version of firmware when I tested, so 61806 now).

Samba is "enabled"
Workgroup is "WORKGROUP"
Connection Limit is "128"
Access Level is "Restricted"
Protocol is SMB "2.02"-"3.11"
Encryption is "Off".
Path is "/mnt/sda", with subdir "test" name "test", public isnt checked, access is set to Read Only.
User is "testuser", with passwort "test123" and Samba is checked for this user.
File System is EXT4.

My PCs see the folder, when I try to open it I am asked for password and get into the folder.
And now all tested systems (Debian Testing and Armbian) keep asking me for password over and over, I cannot access any file.
Checkmarking "remember" in the dialogue does not work.

BUT I can access the folders with those credentials via Android with apps like Amaze file Explorer or X-Plore, or when I borrowed a Windows surface from a friend of mine.
Now... I tried to debug this, and have no idea where to start.

I tried to mount the folder, but am at a loss.
This is no new issue for me, in fact it haunts me since years. Usually I circumvent using DD-WRT Samba at all, but now read only SMB would become handy on a DD-WRT Router...

This happens when I try to mount the folder on one of my PCs:

Code:

sudo mount --mkdir -t smb3 //192.168.1.4/test /mnt/test/ -o ro,username=testuser,password=test123 -vvvvvvvvvvvvvvv
[sudo] password for EDITED:
Host "192.168.1.4" resolved to the following IP addresses: 192.168.1.4
mount.smb3 kernel mount options: ip=192.168.1.4,unc=\\192.168.1.4\test,user=testuser,pass=*******
mount error(13): Permission denied
Refer to the mount.smb3(8) manual page (e.g. man mount.smb3) and kernel log messages (dmesg)

dmesg reads:

[11995.725528] CIFS: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3.1.1), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3.1.1 (or even SMB3 or SMB2.1) specify vers=1.0 on mount.
[11995.725531] CIFS: Attempting to mount //192.168.1.4/test
[11995.827909] CIFS: VFS: buffer length 0 smaller than minimum size 101
[11995.827914] CIFS: VFS: cifs_read_super: get root inode failed



Nothing happens in Routers syslog during those tries.

I redid every setting step by step on my Routers.
Even rebooted after changing one setting, followed by another reboot.
Formatted the disks, changed USB Drives, thumbdrives, formatted them over and over again.

I can access other non DD-WRT SMB Shares, e.g. the ones created by Kodi or Windows.
Coreelec cannot access the DD-WRT Shares, but Windows and Android can.

What am I missing?
I ran in this problem years ago (the moment KSMBD was introduced) and decided to wait and see, read other posts here and seemingly am the only one with SMB problems.
There must be a solution, but currently I'm poking clueless in the dark.
What am I missing?
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16701
Location: Texas, USA

PostPosted: Thu Jun 19, 2025 21:54    Post subject: Reply with quote
I highly doubt the partition is sda. It's probably sda1.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Zyxx
DD-WRT Guru


Joined: 28 Dec 2018
Posts: 989

PostPosted: Fri Jun 20, 2025 8:04    Post subject: Reply with quote
sda is shown in GUI and according to console no sda1:

Code:


root@N4000:~# blkid
/dev/sda: LABEL="SpatiumS270" UUID="2872f5d1-9d73-4527-9c89-427863e70be9"
/dev/nvme0n1p3: UUID="920240eb-01bd-4ed5-a7b2-e1d09cf87d76"
root@N4000:~#

dance85
DD-WRT User


Joined: 02 Jun 2017
Posts: 212

PostPosted: Sat Jul 12, 2025 17:27    Post subject: Reply with quote
Tried on Debian but to no avail. It seems like there are read and write permission issues, but I still can't figure out what to do.
jajajames
DD-WRT Novice


Joined: 21 Aug 2024
Posts: 10

PostPosted: Sun Jul 20, 2025 4:36    Post subject: Reply with quote
same error

my partition is also sda not sda1

This is the client side log:

Jul 19 21:33:03 - kernel: CIFS: Attempting to mount //[redacted]
Jul 19 21:33:03 - kernel: CIFS: VFS: buffer length 0 smaller than minimum size 101
Jul 19 21:33:03 - kernel: CIFS: VFS: cifs_read_super: get root inode failed
jajajames
DD-WRT Novice


Joined: 21 Aug 2024
Posts: 10

PostPosted: Sun Jul 20, 2025 4:38    Post subject: Reply with quote
dance85
DD-WRT User


Joined: 02 Jun 2017
Posts: 212

PostPosted: Tue Jul 29, 2025 2:09    Post subject: Reply with quote
But why does Samba work correctly when installed with Enteware? The problem is in the permissions because access has always been denied. If you disable Samba integrated into the firmware and install it separately, everything works!!!
bermudahonk
DD-WRT Novice


Joined: 17 Aug 2025
Posts: 20

PostPosted: Fri Aug 29, 2025 11:11    Post subject: Reply with quote
Hello there.

I use the build in samba server, but I don't use automount. I mount via startup script. This has always worked for me without issues. I use ext4 formatted drives. I even use LVM with 3 ssd-drives connected to a usb-hub, but that is not important.

As the others have already pointed out, you need a partition to be able to mount a drive. Simply attach that drive to a PC, create a partition table with one partition and format it as ext4 filesystem. Reattach it back to your router and it should work.



Screenshot 2025-08-29 at 13-02-37 erich (build 60791) - NAS.png
 Description:
 Filesize:  126.13 KB
 Viewed:  7903 Time(s)

Screenshot 2025-08-29 at 13-02-37 erich (build 60791) - NAS.png



Screenshot 2025-08-29 at 13-02-00 erich (build 60791) - USB.png
 Description:
 Filesize:  64.01 KB
 Viewed:  7903 Time(s)

Screenshot 2025-08-29 at 13-02-00 erich (build 60791) - USB.png


Zyxx
DD-WRT Guru


Joined: 28 Dec 2018
Posts: 989

PostPosted: Fri Aug 29, 2025 21:01    Post subject: Reply with quote
I did not use automount, too (It did not automount after (re)boot).
But with a self created script I was able to access all data on the drive.
Also unrestricted smb access was no problem.
Only restricted access is and was a problem.

I solved it by setting up my own smb server with very same disk on a small rk powered board.
dance85
DD-WRT User


Joined: 02 Jun 2017
Posts: 212

PostPosted: Sun Aug 31, 2025 19:48    Post subject: Reply with quote
wow, that's awesome! Thanks! Can you tell me exactly what command you use to manually mount drives/partitions?
dance85
DD-WRT User


Joined: 02 Jun 2017
Posts: 212

PostPosted: Mon Sep 01, 2025 6:45    Post subject: Reply with quote
or if you can send me your script that you used that would be great
Zyxx
DD-WRT Guru


Joined: 28 Dec 2018
Posts: 989

PostPosted: Tue Sep 02, 2025 14:53    Post subject: Reply with quote
@dance85, nothing to fancy, just a mount if disk is found.
This is necessary since automount never worked on my x86 dd-wrt router.

This is what I added to startup:
Code:

# mount USB disk if available
echo "if [ -e /dev/sda ]; then echo "/dev/sda available, mounting it">>/var/log/messages; mkdir -p /mnt/sda; mount /dev/sda /mnt/sda; else echo
 "/dev/sda missing, nothing to mount">>/var/log/messages; fi" > /tmp/zyxx.sh
chmod +x /tmp/zyxx.sh
/bin/sh /tmp/zyxx.sh


Also sorry for the late reply!
dance85
DD-WRT User


Joined: 02 Jun 2017
Posts: 212

PostPosted: Fri Sep 05, 2025 9:31    Post subject: Reply with quote
Zyxx wrote:
@dance85, nothing to fancy, just a mount if disk is found.
This is necessary since automount never worked on my x86 dd-wrt router.

This is what I added to startup:
Code:

# mount USB disk if available
echo "if [ -e /dev/sda ]; then echo "/dev/sda available, mounting it">>/var/log/messages; mkdir -p /mnt/sda; mount /dev/sda /mnt/sda; else echo
 "/dev/sda missing, nothing to mount">>/var/log/messages; fi" > /tmp/zyxx.sh
chmod +x /tmp/zyxx.sh
/bin/sh /tmp/zyxx.sh


Also sorry for the late reply!


Sorry for the late reply. I tried this script, it mounts the drive, and I can write, but when I reboot, I lose everything I've written. How can this be?
bermudahonk
DD-WRT Novice


Joined: 17 Aug 2025
Posts: 20

PostPosted: Sat Sep 06, 2025 7:40    Post subject: Reply with quote
You should create a valid partition table on your disk first to actually mount a partition like /dev/sda1.
Format your drive with ext4 filesystem and all will be ok. At least that is how it has always worked in my case.
If you type mount while logged via ssh you then should see the partition mounted.
Here is my output as an example (sda1 is my swap partition):
Code:
root@dd-wrt:~# mount
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512k)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sdb2 on /opt type ext4 (rw,noatime,stripe=8191,data=ordered)

Im my case /dev/sdb2 is mounted on /opt with ext4 filesystem.
I simply use a mount command in my Startup section under Administration -> Commands

Use an empty usb-drive for testing first. Create a single partition on it. Format that partition with ext4. Attach that usb-drive to your router and mount it manually via ssh. Create a folder. Reboot your router, remount the usb-drive manually again and check if the folder your created is still there. It should be.
dance85
DD-WRT User


Joined: 02 Jun 2017
Posts: 212

PostPosted: Sat Sep 06, 2025 9:31    Post subject: Reply with quote
sorry but if I want to mount it manually I have this problem.
my partitions are all ext4



Screenshot 2025-09-06 112925.png
 Description:
 Filesize:  42.84 KB
 Viewed:  6751 Time(s)

Screenshot 2025-09-06 112925.png


Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum