I been messing with samba for OpenWRT on my Netgear R7800 router.
First, I mounted my 14TB drive that was already formatted to EXT4. shared it via samba through the LUCI web gui and everything went well.
then I replace the drive with my 8TB hard drive, re-setup the share again, and now it wont work. I can access the share via winSCP but not through windows network explorer.
Like when you click on the folder icon, click on network in the left side of the window, double click on the router itself, and then the share. which is where I am stuck at right now.
I can temporally fix it by enabling "force root" on the share in samba but I dont want to do that. I want to get it working the same way it was working before when I had the 14TB drive hooked up to the router.
I tried to do a factory reset and started all over again, but still stuck. something tells me that its possible this might be a windows issue but im not sure.
its strange because if you say it works in Linux and not in Windows i guess a permission issue is also out of the window then
I need some more information, can you show some logs, network configuration and firewall, for example did you used a samba password before you did a reset?
i do know if you share had a password it generally doesn't use the linux passwd list for shares, but it uses smbpasswd, you could try using smbpasswd -a root which setup root as a samba user with a samba share password.
Or if you don't want root due security, you can always use shadow-adduser or shadow-useradd opkg to create a new user and then use smbpasswd -a username for that user, in luci your samba share need then also to reflect the same then.
The failure description kind of suggests an issue with the access permissions to the mounted filesystem (chown -R <user> <mount_point> might be in order, maybe also `chmod -R <desired_access_permissions> <mount_point>').
…one of several potential causes, but the one on top of my mind following your description.
I want to mention that I am strictly a windows user on the desktop/laptop/x86/x64 in general. No where in my first post did I mention I use Linux. the only time I use linux is when I am doing a router recovery that requires tools that only work in linux.
No password was setup for the samba share. I never setup a password for any samba shares in my own home. They are using "guest" or "anonymous" with read and write permissions.
I can try to retrieve the config files for you so that you know how the share is currently setup. I did it all through the LUCI gui or webgui. I will try to retrieve those for you in a moment unless you know of some commands I can use. I saw them somewhere on those forums in my search on how to resolve this problem.
ls -l <location> this should show a list with folders and their permissions and ownership, it would be interesting to see what it is on the mount location.
Maybe also some network configuration and firewall would be interesting too depending if you try reaching it from other firewall zones or subnet.
Probably not helpful, but I actually experienced an issue with samba sharing myself yesterday - samba guest share was perfectly accessible from Windows 11 desktop and iPhone 15, but not Windows 11 laptop. When I tried to open the guest share on the laptop, I was prompted to enter credentials and for whatever reason the fallback to guest just didn't seem to kick in. I found by entering username: 'guest', password 'guest' (presumably these could be random?), I was able to get into the share. Presumably this relates to the 'map to guest' facility in samba? In any case, after this, I was able to access the share from my laptop again as normal.
I still think its a permission error like i mentoined earlier.
This shows the samba config so far it looks ok, though you might have no write access since i see 0666 as mask, you could temporary set it to 0755 the create_mask option.
Another thing could be a uuid mismatch, but i doubt this is a issue if it is, you could install blkid and then type blkid to see if uuid matches with in the samba config.
Not to hijack the thread, but I have a question. Is there any reason not to remove the configuration option: 'invalid users = root' and have the 'root' user access samba share, mindful that OpenWrt only really uses one 'root' user? Hitherto I have just made use of guest access, but I'm wondering whether it might increase security to require root/password like how the same is needed for logging into router.
I'm not entirely sure, but i know from the luci app you could specify a user for a share, though ive also seen situations people used root as default hence the log where samba warns there is no user 1000.
Same thing if you try to access: \\ip_router? You could try enabling logging by entering the global configuration option 'log level = 5' then running 'tail -f /var/log/log.smbd' (if I'm remembering correctly).