NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
sshambar2
Sep 16, 2020Star
Samba 3.6.25 build for ReadyNAS NV+ v2
My brother was having difficulties connecting to his ReadyNAS from his work laptop running Win10, and asked if I could enable SMB2 on his NAS (he couldn't install SMB1 compatibility as the laptop is ...
treboR2Robert
Nov 30, 2020Aspirant
I tried installing using edge and got the server error.
I then tried using internet explorer as directed and it installed fine.
HOWEVER
I cannot access the shares from my windows 10 laptop.
I tried all sorts of things to fix it but the only way I can access the shares is to enable smb1 in windows.
The addon tells me it installed correctly and when i click on it everything seems ok but i have no access to the shares.
I installed ssh and dug around inside the usr/sbin folder and found that the addon seemed to have changed smbd and nmbd to .orig files and the new ones are linked to usr/local/sbin
And the files smbd and nmbd seem to both be in usr/local/sbin
so it seems the addon done its job but something is wrong ???
If i disable the addon and turn smb off and back on again from the web interface and try to connect to the share using windows then windows pops up and says i cant connect because its smb1.
I then re-enable the addon and windows just says
attempting to connect for ages then says it cant access the share try checking the name or there might be a problem with your network.
(the same happens if i turn smb off and back on from the web interface after enabling the addon) (and the same happens if i restart the whole unit)
If I disable the addon but DO NOT turn smb off and on from the web interface i get the same message saying attempting to connect for ages and then windows can't access the share, check the spelling etc..
And as i said above if i turn smb off and back on after disabling the addon from the web interface and try connecting again it now says it can't connect because it smb1.
sshambar2
Nov 30, 2020Star
If you have ssh access, it might be easiest to check the following with the plugin installed and SMB2 enabled:
1) if the smbd daemon is running: "ps -ef | grep smbd", should show one or more:
root 1955 1 0 Nov15 ? 00:00:00 /usr/sbin/smbd -D
root 1981 1955 0 Nov15 ? 00:00:00 /usr/sbin/smbd -D
root 7264 1955 0 08:47 ? 00:00:00 /usr/sbin/smbd -D
2) the Samba logs: "more /var/log/samba/log.smbd", should include something like:
[2020/11/15 17:28:16, 0] smbd/server.c:1072(main)
smbd version 3.6.25 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
3) try local client to confirm daemon is working: "smbclient -N -L //readynas" (replace readynas with your server name), should display a list of your shares.
4) make sure SMB2 include files are being loaded:
"grep include /etc/samba/smb.conf" should have "include = /etc/frontview/samba/addons/addons.conf" on the list
"grep include /etc/frontview/samba/addons/addons.conf" should have "include = /etc/frontview/samba/addons/SAMBA36.conf" as output
"cat /etc/frontview/samba/addons/SAMBA36.conf" should contain:
[global]
# enable SMB2 support
max protocol = SMB2
5) If all that looks ok, then you can also try running smbd directly with debug output.
stop current daemon: "/etc/init.d/samba stop"
start samba directly: "/usr/bin/smbd -i -d 1"
... then try to connect from Win10 (-i makes it quit after 1 connection though!)
Something on that list should give you a good idea of what's not working :)
Good luck,
Scott
- treboR2RobertDec 02, 2020Aspirant
Hi Scott,
Thank you for the fast reply.
"ps -ef | grep smbd" gave me
root 2742 2484 0 02:08 pts/0 00:00:00 grep smbd
"more /var/log/samba/log.smbd" game me
[2020/11/30 00:48:36, 0] smbd/server.c:1143(main)
smbd version 3.5.22 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010"smbclient -N -L //readynas" (replaced readynas with my server name) using cmd on my windows 10 laptop game me
'smbclient' is not recognized as an internal or external command,
operable program or batch file.on putty connected to the readynas it gave me
smbclient: error while loading shared libraries: libtevent.so.0: cannot open shared object file: No such file or directory
All of step 4 came back exactly as you said it would.
"/etc/init.d/samba stop" seemed to work in putty, but on the readynas interface SMB was still green (active) and your plugin was also still active. I refreshed the page quite a few times.
"/usr/bin/smbd -i -d 1" (I assume you meant /sbin here as the with /bin it said invalid directory.)
With /sbin it said
/usr/sbin/smbd: error while loading shared libraries: libtevent.so.0: cannot open shared object file: No such file or directory
I am not that clued up when it comes to all this stuff so I'm not sure what's wrong.
Hopefully there is something there that tells you what is wrong, and you can tell me how to fix it.
Thank You !
- treboR2RobertDec 02, 2020Aspirant
I realised with the more command i need to press enter to scroll to the most recent entries.
I done a restart of the ReadyNAS and tried it again.
Looks like the most recent entry is the same.
[2020/12/02 02:04:47, 0] smbd/server.c:1143(main)
smbd version 3.5.22 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010Its the old version right ?
- sshambar2Dec 03, 2020Star
Yep, looks like the dynamic library linker isn't picking up the new libraries in /usr/local/lib (where libtevent.so is installed).
On my brothers ReadyNAS, the linker config files in /etc/ld.so.conf.d/libc.conf contain the following:
# libc default configuration
/usr/local/libThis file is included from /etc/ld.so.conf by it's contents:
include /etc/ld.so.conf.d/*.conf
All that should lead to the linker picking up the required libraries in /usr/local/lib... however, perhaps the library cache is out of date... you could try running:
/sbin/ldconfig
to rebuild the cache ("ls -l /etc/ld.so.cache" should show the file is newly created after running that). You could also run "/sbin/ldconfig -p | grep libtevent" which should show a couple entries for the libtevent.so library...
After that, try running "/usr/sbin/smbd -V" and see if that outputs "Version 3.6.25" as expected... if so, then you should be good to go. (If the ld.so.conf or libc.conf files are not as described above, then they probably need fixing, but I would think that'd be unlikely...)
If the ldconfig command does fix the dynamic linker, then I'll need to add that to the postinstall script on the addon... so let me know if that is indeed the problem. Modern systems generally handle out of date ld.so.cache's well, but these ReadyNASs are running a very old version of linux :)
Good luck,
Scott
- treboR2RobertDec 03, 2020Aspirant
Hi Scott,
Thanks again for the fast reply.
I have to say each time i saw your reply it filled me with fear because it looked so complicated and I am not very code savvy. BUT I concentrated hard each time and followed your CLEAR instructions to the letter and 5 or 10 mins later it was done, so yea thank you again for taking the time to share your work and also for being so quick to help with VERY clear instructions when there was a problem.
Anyway back to it.
I run "/sbin/ldconfig"
and "ls -l /etc/ld.so.cache" showed a time stamp of seconds ago. :smileyhappy:
I then run "/sbin/ldconfig -p | grep libtevent" which showed 2 entries for libtevent.so :smileyhappy:
I then run "/usr/sbin/smbd -V" which showed Version 3.6.25 :smileyhappy:
I then changed directory to /etc/ld.so.conf.d/ and run "vi libc.conf" which showed
# libc default configuration
/usr/local/lib:smileyhappy:
I quit vi by first pressing escape and then pressing ":" and typing "q!" and pressing enter
I then changed directory back to "/etc/" and run "vi ld.so.conf" which showed
include /etc/ld.so.conf.d/*.conf
:smileyhappy:
I quit vi by first pressing escape and then pressing ":" and typing "q!" and pressing enter
So everything looked great, I tried mapping a new network drive in windows 10 like I did with SMB1 (annonymously) and it wouldn't connect.
I then tried turning SMB off and on from the web interface but it still wouldn't connect.
I then remembered someone saying something about either SMB2 or windows 10 not liking annonymous login so I tried "use different credentials" and connecting using the web interface login details (default is admin and password) and it connected straight away.
Obvoiusly now everything is working I will go back and disable annonymous login from my shares and use "users" and permissions etc..
Thank you very much for your help getting it working !!!
I only dug this OLD nv+ v2 out of the cupboard last week to use as a backup for my
FreeNASTrueNAS system and I have still have it completley empty so if you want me to do a factory reset and test the addon once you have fixed what you need to, I am more than happy to do that. Just let me know.Also as a P.S for anyone else who might read this, I also found someone else on the forums here who has created an addon to make the web interface use TLS 1.2 which is very helpful as firefox and other browsers no longer support the TLS version included with the readynas and the only way for me to access the web interface before was either to enable the TLS in firefox (which is not reccomended) or to use the old internet explorer (which I do not like)
The link to the forum post is ;
It does have a quirk to it where it doesn't seem to intsall properly but it actually does :smileyfrustrated:
I commented on it in the last post on that thread so have a look over there.
The creator hasn't replied so maybe sshambar2 could fix the addon ? sorry if thats cheeky Scott :smileytongue:
As I said it does actually work so technically it doesn't need fixing but....
Anyway THANKS again Scott, let me know if you want me to do any testing.
- sshambar2Dec 06, 2020Star
I've released a new version of the addon: https://github.com/sshambar/readynas-arm/releases/tag/Samba36-3.6.25-2
The update updates the library cache on install, and so should fix the samba daemon not running correctly after install.
Please let me know if you still have any problems :)
Thanks,
Scott
- SandsharkDec 06, 2020Sensei
Just to verify: This can be loaded onto an OS 5.3.13 system over the old version or on one that has not previously had it loaded?
- sshambar2Dec 06, 2020Star
Yes, I had my brother install it on his NV+ v2 and it replaced the (currently) installed addon with the new version.
Of course, it's also possible to just remove the old version and install the new one :)
S.
- treboR2RobertDec 06, 2020Aspirant
Hi Scott,
Thanks for updating the addon.
Will installing the new one actually do anything for me ? as mine is obviously now working after what we done the other day.
I am thinking of doing a OS Reinstal anyway as I would like to disable SSH and I don't think there is a way to do that apart from a OS Reinstall or a Factory Reset.
One thing I have noticed when using SMB at the moment is that I can't access my shares if I log in as a user. I have all the correct permissions set up (at least I think so) but no matter what I do, and I have tried A LOT of different things, it will not let me access the shares as a user, it only works if I login using the admin account that I use to access the Web Interface.
I don't know if this worked with the standard SMB1 setup ?
I will have a play this week at some point when I get a chance and report back.
Thanks again :smileyhappy:
- sshambar2Dec 10, 2020Star
Reinstalling the addon will make it so that uninstalling the addon correctly restores the old samba binaries (by re-running the ldconfig on removal)... so you might consider it if you ever think you might remove the addon :)
If you want to disable ssh, that's pretty easy without reinstalling... run the following (as root)
sed -i s/SSH=1/SSH=0/ /etc/default/services
/etc/init.d/ssh stop
I'll have my brother test logging in as non-admin, and see if that works for him.
- treboR2RobertDec 10, 2020Aspirant
Hi mate,
I had a chance last night / today to do a factory reset.
Once reset I tried logging in with the standard smb1 setup and I was having the same problem. After a few hours of pulling my hair out it turned out to be something very simple.
I was trying to access the shares by mapping a network drive in windows 10.
\\xxx.xxx.x.x\c\media
Logging in as admin works fine like this but as a user it says NO !
\\xxx.xxx.x.x\media
It turns out that if I leave the "c" out then I can login as a user no problem :smileylol: :smileyfrustrated:
I'm assuming it has something to do with the fact that only the admin can access \\xxx.xxx.x.x\c but it still doesn't make much sense to me. :smileyindifferent:
Anyway I got everthing setup how I wanted and I then disconneced the mapped drives, disabled SMB1 on my computer and rebooted it.
I installed the new version of your addon and like magic windows connected to it 1st time (without the "c" of course :smileylol:) :smileyvery-happy: I didn't even have to turn SMB off and on in the web interface.
GREAT work Sir !!!
Thank you very much, I (and I guess a fair few others) really appreciate it !
:robotvery-happy:
- treboR2RobertDec 10, 2020Aspirant
That's insteresting that you can disable ssh ( I assume you do this over ssh )
So what happens after you type that command ? Does the ssh session your in just get cut off / disconnected ?
I done a factory reset anyway now so don't need it but thanks for the instructions. :smileyhappy:
- StephenBDec 11, 2020Guru - Experienced User
treboR2Robert wrote:
I'm assuming it has something to do with the fact that only the admin can access \\xxx.xxx.x.x\c but it still doesn't make much sense to me. :smileyindifferent:
Whether it makes sense to you or not, it is precisely because only the admin can access \\xxx.xxx.x.x\c
There are both network permissions and file permissions involved in access controls. The C share is set up so that only the admin has the needed network permissions to access it.
- sshambar2Dec 11, 2020Star
treboR2Robert wrote:So what happens after you type that command ? Does the ssh session your in just get cut off / disconnected ?
No, the command stops the sshd daemon (and disables it starting at boot) which prevents new sessions from connecting, but the current session will continue until you log out.
- StephenBDec 11, 2020Guru - Experienced User
Personally I'd leave ssh enabled, especially on a legacy NAS (where there are no support implications).
- treboR2RobertDec 11, 2020Aspirant
It makes sense that only admin can access c yes.
What doesnt make sense is \\xxx.xxx.x.x\media is NOT the path of media the path of media is \c\media.
When I type \c\media I am trying to access media NOT c
Whether it makes sense to you or whether it makes sense to me doesn't matter as you said.
Thanks for the comment though.
- treboR2RobertDec 11, 2020Aspirant
sshambar2 OK I see what you mean now with the ssh daemon, thanks for explaining, it makes sense.
StephenBThanks for the advice about leaving ssh enabled, but I'm hoping there is nothing else I need to do via ssh now, the unit is just going to used as a backup for my TrueNAS server.
My thinking is why leave something enabled that could "potentially" be a security risk. I could be wrong (I usually am). Anyway if there is something else I need to do via ssh I can always enable it again. Is there something you reccomend doing via ssh ?
- StephenBDec 11, 2020Guru - Experienced User
It is useful for some troubleshooting/fixes. For instance if the OS partition gets full.
But generally when you need it for that, you can't enable it - because the Web UI isn't working properly. So I just leave it enabled on my ReadyNAS. Port 22 isn't exposed to the internet, so the only security risks are on my local LAN.
- SandsharkDec 11, 2020Sensei
treboR2Robert wrote:It makes sense that only admin can access c yes.
What doesnt make sense is \\xxx.xxx.x.x\media is NOT the path of media the path of media is \c\media.
When I type \c\media I am trying to access media NOT c
\\xxx.xxx.x.x\media isn't the full Linux path, but it is the share name. It's done that way so everybody doesn't need access to C.
- StephenBDec 11, 2020Guru - Experienced User
Sandshark wrote:
treboR2Robert wrote:
It makes sense that only admin can access c yes.
What doesnt make sense is \\xxx.xxx.x.x\media is NOT the path of media the path of media is \c\media.
When I type \c\media I am trying to access media NOT c
\\xxx.xxx.x.x\media isn't the full Linux path, but it is the share name. It's done that way so everybody doesn't need access to C.
Yes. Network access to any UNC that starts with \\xxx.xxx.x.x\c requires access to to c share. That is the way SMB network shares work.
- SandsharkDec 11, 2020Sensei
sshambar2 wrote:If you want to disable ssh, that's pretty easy without reinstalling... run the following (as root)
sed -i s/SSH=1/SSH=0/ /etc/default/services
/etc/init.d/ssh stop
And then you can turn it back on again by re-loading the add-on?
The SSH add-on for OS4.x is a toggle, and is called that. The one for OS5.x is just called an enable, but might also toggle. I've never tried.
- treboR2RobertDec 11, 2020Aspirant
Sandshark wrote:
The SSH add-on for OS4.x is a toggle, and is called that. The one for OS5.x is just called an enable, but might also toggle. I've never tried.I saw this too that for OS4.x the addon is a toggle to turn ssh on and off.
Unfortunately the addon for OS5.x is only for enabling ssh. I actually tried installing it for a 2nd time (to try and disable ssh) and it did nothing, it just said addon installed succesfully and ssh was still enabled.
- treboR2RobertDec 11, 2020Aspirant
StephenB wrote:Yes. Network access to any UNC that starts with \\xxx.xxx.x.x\c requires access to to c share. That is the way SMB network shares work.
Makes sense if you know i guess.
I probably did know at some point and forgot.
And I will probably forget next time too :smileylol:
- treboR2RobertDec 11, 2020Aspirant
StephenB wrote:It is useful for some troubleshooting/fixes. For instance if the OS partition gets full.
But generally when you need it for that, you can't enable it - because the Web UI isn't working properly. So I just leave it enabled on my ReadyNAS. Port 22 isn't exposed to the internet, so the only security risks are on my local LAN.
I see your reasoning.
Hopefully mine will be ok though as I am only using the system as a backup for my TrueNAS and 99% of the time it will be off and just get powered on by schedule for backups.
The only service running will be rysnc and https. (SMB I will turn on and off as I need it)
Getting TrueNAS to rsync directly to the ReadyNAS the other day took me AGES to fugure out :smileyfrustrated:
I am in two minds at the moment though whether to leave the ReadyNAS at my mums house and try and get the TrueNAS at my house to rsync over ssh so that the backup is "off site".
I think it may be a little over my head though to get that working securely.
- StephenBDec 12, 2020Guru - Experienced User
treboR2Robert wrote:
StephenB wrote:
It is useful for some troubleshooting/fixes. For instance if the OS partition gets full.
But generally when you need it for that, you can't enable it - because the Web UI isn't working properly. So I just leave it enabled on my ReadyNAS. Port 22 isn't exposed to the internet, so the only security risks are on my local LAN.
I see your reasoning.
Hopefully mine will be ok though as I am only using the system as a backup for my TrueNAS and 99% of the time it will be off and just get powered on by schedule for backups.
The only service running will be rysnc and https. (SMB I will turn on and off as I need it)
The only file sharing protocol I enable on my own backup NAS is rsync. Though as I said, I do have ssh enabled on them.
If you disable ssh, then you can still gain access through tech support mode. Though I haven't gone through the steps needed to mount the OS partition and data volume(s) on the v2 (since I don't own that model).
And of course if the ReadyNAS does run into trouble, you can factory default and run the backups again (as long as the TrueNAS remains healthy).
treboR2Robert wrote:
...try and get the TrueNAS at my house to rsync over ssh so that the backup is "off site".
I think it may be a little over my head though to get that working securely.
I don't believe your ReadyNAS model has built-in support for rsync over ssh - if I'm correct on that, it would be tricky to get this to work.
- treboR2RobertDec 12, 2020Aspirant
StephenB wrote:
treboR2Robert wrote:...try and get the TrueNAS at my house to rsync over ssh so that the backup is "off site".
I think it may be a little over my head though to get that working securely.
I don't believe your ReadyNAS model has built-in support for rsync over ssh - if I'm correct on that, it would be tricky to get this to work.
I have been doing a bit of research and I think I may have found a way to make it work (maybe) :smileyindifferent:
At home I have a Asus Router running Asuswrt-Merlin with a OpenVPN server.
At my mums I have another Asus Router running Merlin LTS.
I had a "quick" read online and it seems I may be able to set the Router at my mums house to use OpenVPN as a client, BUT only for the ReadyNAS ( so all other devices at my mums wouldn't use the VPN)
I am thinking that this will mean that the ReadyNAS (at my mums) and the TrueNAS (at my house) will think they are on the same network and I can just do normal Rsync betwwen them.
Got some other stuff to do over the weekend so I'll do a bit more research if I get a minute and then I'll try it out next week and report back here incase anyone else wants to do it.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!