Why are CIFS shares accessible correctly via IP of Host, but not the Host name?

Status
Not open for further replies.

Wozza J

Dabbler
Joined
Aug 2, 2016
Messages
20
Hi Gurus!

As (it seems) with a lot of people, I am finding what should be very straightforward, very confusing - CIFS!! I am 99% adamant I have the shares, permissions, users and groups set up correctly (including not having the users primary group the same name as the username and the username the same as the Windows logon name) yet when I open Windows Explorer (in Windows 10 on a four Windows 10 machine home network), under Network, the FreeNAS box does not show up, but not only that, if I enter \\FREENAS in the address field (FREENAS is the name of the host), then I see all the shares. If I try to access them as one of the defined users who has explicit permissions set for that share & files, I get prompted for a username and password to which I enter FREENAS\the-specific-username and the password. This username and password is the same as the Windows logon, but does not accept it saying it is not accessible and may not have permission to use the network resource...... If I cancel that and enter the ip address in the address field as \\10.0.0.100, I see all the same shares and am able to access the shares correctly as the permissions are granted and not to those where they aren't - in other word, it works correctly!! Why would this be and how can it be resolved so the FREENAS box shows up in Windows Explorer and by clicking on it, the shares show and permissions work as they should instead of having to keep typing the ip address in the address field on Windows Explorer?

Fresh install of FreeNAS-9.10-STABLE-201606270534 (dd17351)

Thanks in advance and if required, please let me know of any further info you may require.

Wozza.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hi Gurus!

As (it seems) with a lot of people, I am finding what should be very straightforward, very confusing - CIFS!! I am 99% adamant I have the shares, permissions, users and groups set up correctly (including not having the users primary group the same name as the username and the username the same as the Windows logon name) yet when I open Windows Explorer (in Windows 10 on a four Windows 10 machine home network), under Network, the FreeNAS box does not show up, but not only that, if I enter \\FREENAS in the address field (FREENAS is the name of the host), then I see all the shares. If I try to access them as one of the defined users who has explicit permissions set for that share & files, I get prompted for a username and password to which I enter FREENAS\the-specific-username and the password. This username and password is the same as the Windows logon, but does not accept it saying it is not accessible and may not have permission to use the network resource...... If I cancel that and enter the ip address in the address field as \\10.0.0.100, I see all the same shares and am able to access the shares correctly as the permissions are granted and not to those where they aren't - in other word, it works correctly!! Why would this be and how can it be resolved so the FREENAS box shows up in Windows Explorer and by clicking on it, the shares show and permissions work as they should instead of having to keep typing the ip address in the address field on Windows Explorer?

Fresh install of FreeNAS-9.10-STABLE-201606270534 (dd17351)

Thanks in advance and if required, please let me know of any further info you may require.

Wozza.

Fixing netbios issues is always annoying. Especially if your master browser is not always available (it can take up to an hour for clients to be informed that the master browser is down).
  • First find out which computer on your network is acting as the master browser. On your FreeNAS server type "nmblookup -M <workgroup>". If your workgroup is "foo", then type "nmblookup -M FOO". Note the ip-address of the master browser. Then on your windows computer type "nbtstat -a <ip-address>" i.e. nbtstat -a 192.168.0.120. You should see an entry with __MSBROWSE__ in it. If that works, then it appears that the master browse list isn't getting properly populated. This can indicate that it's time to move this role to the FreeNAS server (which should be reliably turned on).
  • If the master browser on your network is a linux server, view its smb.conf file and verify that it is not configured as the "preferred master".
  • Then make your FreeNAS server the "preferred master" for your network by going to "services" -> "CIFS" and checking the box "local master" and adding the auxiliary parameter "preferred master = yes". This parameter has the effect of forcing a master browser election when the FreeNAS server boots and setting the OS level of the FreeNAS server high enough that it should win the election (unless another samba server has an OS level set higher - vendors do stupid things).
  • Then make sure that your clients are (1) in the same workgroup as the FreeNAS server (2) have network discovery enabled and (3) have the appropriate firewall ports open to allow netbios name resolution.
  • Then prepare some sacrifices (I recommend starting with a simple libation and move your way up to small goats for Apollo).
Note that this stuff can take up to an hour to sort itself out. You're using tech from the 80's. Enjoy.
 
Last edited:

Wozza J

Dabbler
Joined
Aug 2, 2016
Messages
20
Fixing netbios issues is always annoying. Especially if your master browser is not always available (it can take up to an hour for clients to be informed that the master browser is down).

Hi Anodos.

Many thanks for your suggestions.

Just after posting my question I had a sudden epiphany which resolved the issue of the FreeNAS box not showing up in Windows Explorer. That is to simply enable Netbios over TCP/IP on the NIC. Not sure why I didn't think of that before!! I will go through your recommendations and let you know how it goes!

Thanks again.

Woz.
 
Status
Not open for further replies.
Top