Finder Shows disabled smb share

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
Hi all,

I've recently noted, after few changes on my shares, that SMB icon is constantly present on finder even if service is down. The issue happen to all mac on the network, i've tried to reboot but no changes. I'm not able to define if this issue is after an update and specially which one can be, just 2 weeks ago i switched to afp and smb remains a "secondary" read-only share for few devices such as VM or HTPC.
Of course in SMB service "zero-conf discovery service" is not selected :rolleyes:.
Does anyone knows how to totally hide SMB icon in finder maintaining share active ? Thanks in advance and regards.
Schermata 2019-07-07 alle 08.43.56.png

Schermata 2019-07-07 alle 08.47.14.png


SMB-Configuration is:

server min protocol = SMB2_02
server max protocol = SMB3
interfaces = 127.0.0.1 172.16.10.37
bind interfaces only = yes
encrypt passwords = yes
dns proxy = no
strict locking = no
aio max threads = 2
oplocks = yes
deadtime = 15
max log size = 51200
private dir = /var/db/samba4/private
max open files = 939845
logging = file
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
obey pam restrictions = no
ntlm auth = no
directory name cache size = 0
kernel change notify = no
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
acl allow execute always = false
dos filemode = yes
multicast dns register = no
domain logons = no
local master = no
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = FREENAS_SMB
workgroup = PIPPO
security = user
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
The samba server performs mDNS registration for _smb._tcp for the server's hostname (not netbios name). If it's not running, it shouldn't be registered. What do you see if you type dns-sd -B _smb._tcp.
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
The samba server performs mDNS registration for _smb._tcp for the server's hostname (not netbios name). If it's not running, it shouldn't be registered. What do you see if you type dns-sd -B _smb._tcp.
anodos,
thanks for your reply, here below the output of command with and without SMB service active (zero-conf discovery service is always off). there is no changes between active or not active service o_O..

Those 2 devices (i don't know why are duplicated) are present and active on the network but only the YYYYYY is connected to SMB share the other one should not .

Browsing for _smb._tcp.
DATE: ---Mon 08 Jul 2019---
18:35:59.402 ...STARTING...
Timestamp A/R Flags if Domain Service Type Instance Name
18:35:59.403 Add 3 2 local. _smb._tcp. Mac mini XXXXXXXXXX
18:35:59.403 Add 3 1 local. _smb._tcp. Mac mini XXXXXXXXXX
18:35:59.403 Add 3 1 local. _smb._tcp. YYYYYYYYYY
18:35:59.403 Add 2 2 local. _smb._tcp. YYYYYYYYYY

(note: XXXXXX and YYYYY are hidden by me in order to avoid device name ... security first !!)

Thanks again for your support and Regards
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
anodos,
thanks for your reply, here below the output of command with and without SMB service active (zero-conf discovery service is always off). there is no changes between active or not active service o_O..

Those 2 devices (i don't know why are duplicated) are present and active on the network but only the YYYYYY is connected to SMB share the other one should not .

Browsing for _smb._tcp.
DATE: ---Mon 08 Jul 2019---
18:35:59.402 ...STARTING...
Timestamp A/R Flags if Domain Service Type Instance Name
18:35:59.403 Add 3 2 local. _smb._tcp. Mac mini XXXXXXXXXX
18:35:59.403 Add 3 1 local. _smb._tcp. Mac mini XXXXXXXXXX
18:35:59.403 Add 3 1 local. _smb._tcp. YYYYYYYYYY
18:35:59.403 Add 2 2 local. _smb._tcp. YYYYYYYYYY

(note: XXXXXX and YYYYY are hidden by me in order to avoid device name ... security first !!)

Thanks again for your support and Regards
The number of times that a device appears in the Browse list depends on network topology / number of interfaces in the client. If you have enabled both WiFi and a wired connection on the Mac, then both interfaces may pick up the same computer. (That's why you have `if` 1 and 2). Is YYYYY `FREENAS_SMB`?
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
The number of times that a device appears in the Browse list depends on network topology / number of interfaces in the client. If you have enabled both WiFi and a wired connection on the Mac, then both interfaces may pick up the same computer. (That's why you have `if` 1 and 2). Is YYYYY `FREENAS_SMB`?
ok, got it, it make sense that same device appears 2 time due to wifi-eth NIC's.

No, YYYYYYY is another device on the network, Freenas doesn't appear onto list, neither with SMB active, nor if not active.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
ok, got it, it make sense that same device appears 2 time due to wifi-eth NIC's.

No, YYYYYYY is another device on the network, Freenas doesn't appear onto list, neither with SMB active, nor if not active.

Well, that means you've successfully ruled out mDNS as the reason why it's visible in finder ;)
I haven't looked closely at recent MacOS behavior. It's possibly showing based on NetBIOS-NS broadcasts from the FreeNAS server. It might be stale cached information in Finder. What version of MacOS is this?
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
Well, that means you've successfully ruled out mDNS as the reason why it's visible in finder ;)
I haven't looked closely at recent MacOS behavior. It's possibly showing based on NetBIOS-NS broadcasts from the FreeNAS server. It might be stale cached information in Finder. What version of MacOS is this?
I'm thinking too that NetBIOS is announcing on the broadcast and can be related to "lm announce", i've already tried to edit and change to "no" but after reboot is automatically "yes"


Schermata 2019-07-09 alle 07.44.19.png

MAC OS 10.13 and 10.12 not upgradable
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I'm thinking too that NetBIOS is announcing on the broadcast and can be related to "lm announce", i've already tried to edit and change to "no" but after reboot is automatically "yes"


View attachment 31775
MAC OS 10.13 and 10.12 not upgradable
What you need to do is disable nmbd. Try pkill -9 nmbd and then run the command service samba_server status to verify that he's dead.
 

korrupto77

Explorer
Joined
Jan 2, 2013
Messages
50
What you need to do is disable nmbd. Try pkill -9 nmbd and then run the command service samba_server status to verify that he's dead.
ok i did some test :
SMB Stopped :

nmbd is not running.
smbd is not running.
winbindd is not running

SMB Running:
nmbd is running as pid 35932.
smbd is running as pid 35936.
winbindd is running as pid 35942.

SMB Running after pkill -9 nmbd
nmbd is not running.
smbd is running as pid 35936.
winbindd is running as pid 35942.

Update :
I 'm checking if really Freenas_SMB disappear from finder(i hope so :rolleyes:) i noted that after pkill nmbd, SMB service is off nevertheless i can mount SMB share as usual and if I'm relaunching the service, Freenas_SMB return visible:

How do I stop definitively nmbd form being restarted after reboot or service relaunch ?
Schermata 2019-07-13 alle 13.18.11.png

Thanks
 
Last edited:
Top