What's new

Samba Resharing Function

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Zhenya

Occasional Visitor
A shot in the dark:

I have an older NAS that supports only SMB v1. Modern devices (iPads, Mac OS) seem to not support it and only support SMB v2.

Is there a function where the router connects to a NAS via SMB v1 and exposes it to the network as a SMB V2?
 
Last edited:
A shot in the dark:

I have an older NAS that supports only SMB v1. Modern devices (iPads, Mac OS) seem to not support it and only support SMB v2.

Is there a function where the router connects to a NAS via SMB v1 and exposes it to the network as a SMB V2?
This may be a long shot:
Some MacOS versions unofficially supported SMB1 by using cifs://User@NAS_IP/Shared_Dir if from Finder you enter that directly in Go > Connect to Server. Using smb:// etc defaults to SMB2+.

Otherwise there may be ways to get your NAS to support SMB2+. What NAS is it and what version of its OS is running?
If you can ssh into it, you should be able to see the Samba version:
#: smbd -V
and check the build options:
#: smbd -b
look for vfs_catia, vfs_fruit, vfs_streams_xattr and various aio_ "includes" or modules
 
In theory this is doable. As you have no signature, I am assuming you are using Merlin and have SSH access to your router.

You will first need to create a directory on the router for where you are going to mount your NAS share. An example would be mkdir /mnt/NAS.

Then mount your NAS share to the directory you just created. Change the address, username, and password to meet your requirements.

Code:
mount -t cifs \\\\192.168.189.5\\share /mnt/NAS -o "vers=1.0,username=${USERNAME},password=${PASSWORD}"

You can then CD into the /mnt/NAS directory and make sure you have access. If everything is OK, you can then add the mount command to the services-start script or the fstab.add script so the directory is mounted on router start up. I would use the services-start script as I am not sure how an error in fstab would affect the router start up. Don't forget to add the mkdir -p /mnt/NAS command to the services-start file as well as that directory will not survive a reboot.

Then, create the file /jffs/configs/smb.conf.add and add something like this; where user1 and user2 are the users that you created under the samba GUI settings

Code:
[Test]
comment = test directory
path = /mnt/NAS
dos filetimes = yes
fake directory create times = yes
valid users = admin, user1, user2
invalid users =
read list = admin, user1, user2
write list = admin, user1,user2

restart the samba service: service restart_samba and see if your NAS files are available on the Router share "test"

I tested this on my system. I was surprised that I did not run into permission issues, but I was able to create new files on the NAS ok and they simply inherited ownership from the NAS.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top