dlandon / unassigned.devices

Unassigned Devices plugin for unRAID
Other
81 stars 39 forks source link

Fix list_samba_hosts #47

Closed gfjardim closed 4 years ago

dlandon commented 4 years ago

Doesn't nmblookup depend on netbios?

gfjardim commented 4 years ago

Yes, it takes some time but retrieved my Airbook, my Unraid server and my Win10 laptop.

dlandon commented 4 years ago

This is a partial answer. If I turn off netbios on my server, the lookup doesn't work. I can implement this lookup if netbios on the server is enabled, otherwise I'll disable it.

gfjardim commented 4 years ago

Apparently there's a workaround, let me investigate it.

dlandon commented 4 years ago

Thank you. I haven't had much luck finding out how to do this.

gfjardim commented 4 years ago

Ok, there are two ways of doing this:

1) scan the network for port 445 and then resolving the NETBIOS name. This has the advantage of detecting hosts even if NETBIOS is disabled, by adding the IP address to the list;

2) override SAMBA configuration at nmblookup command. This will search que workgroup for NETBIOS enabled machines, but will left behind those with NETBIOS disabled.