neighbors

CentOS server not found in Windows Network Neighborhood

There is a CentOS 7 file server that is accessible and works well; however, the Microsoft Windows Network Neighborhood does not display it. After some digging around, there is a simple fix for that.

Edit the /etc/samba/smb.conf file and under the [global] section add/modify the following lines to look like this.

local master = yes
os level = 34

Then restart the service.

service smb restart
#or
systemctl restart smb.service
#or
systemctl restart smb

This integer value controls what level Samba advertises itself as for browse elections. The value of this parameter determines whether nmbd(8) has a chance of becoming a local master browser for the workgroup in the local broadcast area. Microsoft Operating systems are assigned values, where for example Windows NT 4.0/2000 Domain Controllers will be a 33. The maximum value for this parameter is 255. If you use higher values, counting will start at 0! The default value is 20.

Default: os level = 20

The 'preferred master' setting will force a new election each time that machine boots or Samba restarts.

After this change was applied, the server is successfully listed in the Microsoft Windows Network Neighborhood.

Source(s)
https://www.centos.org/forums/viewtopic.php?t=46324
https://www.samba.org/samba/docs/man/manpages/smb.conf.5.html
http://www.oreilly.com/openbook/samba/book/ch05_01.html