Posted: Thu Jun 19, 2025 21:48 Post subject: Need advice for troubleshooting SMB
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?
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!!!
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-00 erich (build 60791) - USB.png
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, 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
@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?
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.