NFS versus Samba

kiteboy

n3wb
Joined
Jun 20, 2015
Messages
20
Reaction score
0
Hi all

Im having terrible trouble getting samba to work on my hikvision camera - DS-2CD2385G1-I

Ive upgraded my Ubuntu server to the latest LTS version and the samba seems to be set up correctly on the box - I can connect via Windows to the share no problem at all
Ive set up a partition of various sizes-Ive added and removed samba users- Ive made sure the folder is writable and owned by the samba user etc etc

Ive tried what I think is everything but I just cant connect at all through samba - it has previously worked fine by the way too - so have no clue why it wont connect
I know samba can be a pain - Ive had to set up numerous times but for whatever reason I cant even connect to the Share

I know most of the issues with Samba I think but I just cant solve it at the moment - so just thinking maybe I should try NFS - never set that up - is it more reliable than samba
Been even thinking that an NVR would be better
Any thoughts welcome
 

Wilbur

n3wb
Joined
Mar 4, 2019
Messages
14
Reaction score
3
Location
UK
Its a while since I switched from using Samba to NFS. Samba is designed to allow sharing Linux volumes with Windows systems. If you use Samba I think you also have to set up Quotas for each user. It gets messy. Just set up an NFS share and give the ip address of the camera access. My Hikvision devices (one 4 year old camera and a DVR) format the entire NFS with pre-allocated files so the partition/share is 100% used (I guess that is why with Samba you need quotas). My NFSs are on a NAS. One for the cam and one for DVD. The one for DVR has a much smaller size that the HDD in the DVR and it just used as a redundant drive in-case the DVR dies/stolen/damaged. Never had any problem with reliability over several years.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
Ive upgraded my Ubuntu server to the latest LTS version and the samba seems to be set up correctly on the box - I can connect via Windows to the share no problem at all
Depending on the version of Ubuntu ('latest' is not specific) it may be that it's no longer providing SMB1 as needed by the Hikvision DS-2CD2385G1-I camera.

I just checked with that same model of camera, currently running firmware version 5.6.2 build 190701 and by changing SMB versions on a NAS SMB/CIFS share confirmed that only SMB1 is supported. The camera will not connect with any higher versions.
I've not tried the 5.6.5 Build 200316 which is the current firmware version, though I've not seen any release notes mentioning updated SMB support.

To confirm this is the likely cause of your problem, you could check SMB on your Ubuntu server :
First, check if the SMB versions are constrained to specific versions -
cat /etc/samba/smb.conf | grep protocol
Or look for any configuration entries in [global] such as
client min protocol = SMB2

And if the SMB code version is 4.11.x or higher then SMB V1 has been removed due to security vulnerabilities.
sudo smbstatus --version
 

kiteboy

n3wb
Joined
Jun 20, 2015
Messages
20
Reaction score
0
I have given up on samba...I was using Ubuntu server 18.04 now on 20.04 I think
I tried the ntlm auth v1 permitted but that made no difference....now thinking that you maybe right about the samba version....I think that's the only thing I haven't tried to be honest
Anyway tried NFS this afternoon and within 30mins of installing NFS both cameras are working/ recording again....so much easier

Dont really need to see the shares on windows really anyway....and given the ease of NFS I could do without the grief....I can access the camera recordings through the he hikvison app anyway.....thanks all though...big relief its now working
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
Yes, there is no doubt that NFS is much easier to deploy for these Hikvision devices.

Presumably you are aware though that the flip side is that access to the share is much more open than with SMB.
If your environment is benign, that's fine, but just bear that in mind.
 

kiteboy

n3wb
Joined
Jun 20, 2015
Messages
20
Reaction score
0
Its only a home environment so Im not TOO concerned - I may go back to trying samba later and try the v1 thing - but Im pretty sure Ive never specified that in the past

But could be an ubuntu things thats dropped off too I suppose

I assume samba V1 is less secure in some way too??

It bugs me when stuff doesnt work - I was even thinking of getting an NVR to solve it once and for all but that seems silly when I have the capacity to do it anyway and it saves me £150 or so
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,980
Reaction score
6,802
Location
Scotland
I think you'll find that your Ubuntu no longer supports the needed Samba V1.
Check the samba code version to confirm.

Samba v1 is deprecated due to security vulnerabilities.
 
Top