Samba share on X86_64

Post new topic   Reply to topic    DD-WRT Forum Index -> X86 based Hardware
Author Message
broca
DD-WRT Novice


Joined: 10 May 2022
Posts: 15

PostPosted: Fri Mar 28, 2025 0:05    Post subject: Samba share on X86_64 Reply with quote
I was able to share an USB Drive attached to a Netgear X10 DD-WRT Gateway amongst a Windows PC and a Linux PC.

After replacing the Netgear Gateway with a X86-64 DD-WRT gateway, it made sense to use the internal SATA attached drive instead of the USB drive. After some work and a dozen boot drive reflash, I managed to created a stable samba share with a RAID 1 array. The Windows PC connected to the share without issue. But the Linux PC encountered with "permission denied" issue.

I double checked and modified the Linux PC fstab entry per some Google search result; I changed the username and password; even removed all the special characters without avail. Thinking it will work, I put the USB drive on the X86-64 DD-WRT gateway; same USB setting and samba share setting as the Netgear without the RAID array. Surprisingly, again, Windows PC connects, Linux PC permission denied.

Google said sometime is the domain setting; tried that and Google is running out of idea, Smile

Expert help please! what and where should I start looking?

Windows PC is on Windows 11; Linux PC is Kubuntu 24.04
Netgear x10 is on std image, Wifi diabled. X86 is on professional license, no Wifi. Both running v3.0-r58950 with blank LAN Domain name; Workgroup of the samba share is set to WORKGROUP. Name of the share is NAS.
The fstab entry in the Linux PC is //samba_share_ip/NAS /home/user/NAS cifs credentials=/home/user/.credentials,uid=1000,gid=1000 0 0
The .credentials file contains the username= and password= lines.
USB drive and RAID array are ext4 fs.

Please also note that I have turned the Netgear gateway back on with the USB Drive. Currently, both PC are connected to the share without and issue.
Sponsor
flood404
DD-WRT User


Joined: 18 Dec 2013
Posts: 438

PostPosted: Sun Mar 30, 2025 15:48    Post subject: Reply with quote
You have to mount SATA internal connected drives using a startup command. Or you will not see it as an option.


Go to http://192.168.1.1/NAS.asp look at drive manager all the way down on the bottom. Make sure USB and Automatic drive mount is enabled. Which I am sure it is already.


You will see a list of drives there.

/dev/sda1 for example. Yours might be /dev/sdb however it's listed there you need to remember what it is. Then go to administration tab on top. Then go to commands.

In the blank field copy and paste this. It has to be spaced out like this.

mkdir /tmp/mydisc

mount -o rw /dev/*** /tmp/mydisc


Change the *** to what your drive is assigned to. Its going to be sda or sdb or sdc Then click save startup it will save it as a startup script and run it at every boot. Then reboot the system.


Next go to the NAS tab.

Go to the file sharing configuration.
The drive will be selectable there now. I would set it up like mine is.


Then you can add the Drive as a network share in Windows by using \\192.168.1.1\Drive1 Which I am sure you already know how to do that part. Linux every distro has their own way with this. In Linux Mint I use the address like this. smb://192.168.1.1/drive1 I have no issues accessing any of my shared drives it does require me to use the user name and password when accessing it.


You can add as many drives as you want but you have to add a command to keep the drives seperate. For example my startup script is like this.

mkdir /tmp/mydisc

mount -o rw /dev/sda1 /tmp/mydisc

mkdir /tmp/mydisc1

mount -o rw /dev/sdb /tmp/mydisc1

mkdir /tmp/mydisc2

mount -o rw /dev/sdd /tmp/mydisc2

mkdir /tmp/mydisc3

mount -o rw /dev/sde /tmp/mydisc3

mkdir /tmp/mydisc4

mount -o rw /dev/sdf /tmp/mydisc4



Setup NAS.jpg
 Description:
 Filesize:  133.45 KB
 Viewed:  347 Time(s)

Setup NAS.jpg


broca
DD-WRT Novice


Joined: 10 May 2022
Posts: 15

PostPosted: Sun Mar 30, 2025 20:33    Post subject: Samba share on X86_64 Reply with quote
Thank you, Flood404,

Everything tells me the share is set up properly in my X86_64 DD-WRT gateway. Windows can access it without problem. It is my Kubuntu PC having problem. It saw the gateway but can't mount the share.
I did some trouble shooting today. Windows PC can ping the gateway's hostname and ip address. Kubuntu only can ping the ip address not the hostname. I am not sure where I look next.

Forum modulator, appreciate you allowing this post remain here. I don't think this is DD-WRT issue at this point. I am hoping someone can share some trouble shooting insight. If you like to move this to another forum, please kindly do so. It could get more exposures.

Thank you very much.
flood404
DD-WRT User


Joined: 18 Dec 2013
Posts: 438

PostPosted: Mon Apr 07, 2025 14:57    Post subject: Reply with quote
Try accessing it with smb://192.168.1.1 with your file manager or mount it as a network drive. I would see if it works with Linux Mint. I don't use that other distro you mentioned about. So I am not sure how their file manager works. You might be missing samba or samba isn't installed on your distro. Linux Mint it's installed by default.
broca
DD-WRT Novice


Joined: 10 May 2022
Posts: 15

PostPosted: Mon Apr 07, 2025 17:12    Post subject: Reply with quote
I am so glad you stay with this thread. Thank you very much.

I still have one old 160G SATA drive. I can try Linux Mint too. I will share the result here.

However, I started to wonder if DD-WRT's Samba share implementation only applies to USB drives. However, it doesn't make sense if that is the case.

DD-WRT gurus - shed some light into this, please. I have tried r58950 and r59429. Both gave me the same problem. Any idea which release I should try next?

Appreciate.

p.s. USB Drive that was shared successfully attaching to a Netgear R9000 router doesn't work on the X86_64 DD-WRT as well. The USB Drive auto-mounted without issue and I was able to add the share under NAS tab. But it just won't allow my Kubunto PC make connection - premission denied.
It is almost like the X86_64 Samba acts differently from the router Samba.
flood404
DD-WRT User


Joined: 18 Dec 2013
Posts: 438

PostPosted: Mon Apr 07, 2025 20:13    Post subject: Reply with quote
https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2025/04-06-2025-r60611

This is the latest build.


As for USB shares on the x86 and x64. Each USB drive will need to be manually setup so the hot swap works. Each USB drive will need it's own name as a share. Of course when you unplug it the share will not work but be listed in the samba or network share but will not have access to it until it's plugged in.


I think it's because the router's USB will always be a certain port and can be coded easier to allow automatic drive mount to work. On the PC it's impossible to know where the drive will be at or shared with a USB hub or some other crazy setup.
broca
DD-WRT Novice


Joined: 10 May 2022
Posts: 15

PostPosted: Mon Apr 07, 2025 22:35    Post subject: Reply with quote
Good points on the USB drives. Personal computers nowaday has so many USB ports with different standards. I think I went too far too fast.
Next thing for me would be undo everything I did so far and just concentrate on sharing one partition on one SATA drive.

Well, look like I might have to reflash the boot drive again. Every time I try to undo something, DD-WRT seems to remember what was done and eventually become unstalbe. Maybe this time I will do an upgrade to the first March 2025 release and reset everything that way.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> X86 based Hardware 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 cannot attach files in this forum
You cannot download files in this forum