CIFS share authentication only works with FQDN or ip not with domain name

Status
Not open for further replies.
Joined
Oct 10, 2014
Messages
6
I cannot get my FreeNAS server to authenticate when using my server name, nas. It does however work when I use the server IP to connect or the FQDN of the server.

I'm using the latest FreeNAS version and a Windows 7 machine to connect.

Clarification: I'm using Active Directory mode and have connected to my Windows Server 2012 DC. It works when I connect to \\nas.internal.t-net.se and \\172.30.0.240 but not when I connect to \\nas.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
What have you put as netbios name in the CIFS service dialogue? Do both machines have the same workgroup name?
 
Joined
Oct 10, 2014
Messages
6
Here's some pics. Settings for CIFS and Active Directory. I also ran a couple of nbtstat commands on my DC.

k1hiPBf.png

hEqjxHL.png

Q4ECBpI.png

ZPIIkYf.png

yXM69Qe.png


EDIT: Two from the client.
B6uWWLQ.png

AuO81xY.png
 
Last edited:

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Well, assuming they're on the same IP subnet, it should just work! Neither of them seem to be master browser though. If there are no other candidates it might be worth encouraging one or other of them to do this. No idea about Windows but man smb.conf tells you how to do that on Freenas.
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Sorry, what I wrote above is rubbish; I have discovered that AD is supposed to use DNS. The answer seems to be either to put the "nas" hostname in the 'hosts' file on Windows, or to put the relevant domain in the 'search domain' field on Windows. Either should give Windows the right IP when searching by hostname using DNS (assuming you must have an appropriate DNS server somewhere or else the FQDN wouldn't work).
 
Joined
Oct 10, 2014
Messages
6
I've tried adding dhcp option 119 to my domain controllers DHCP-server but it doesn't seem to work. It might be that NetBIOS is being used and that I'm on the same subnet. I do not have nor will I be having total control over the clients as they're joined to a different domain.

EDIT: Connecting with my Macbook Air works like a charm so I think it's something to do with how windows uses NetBIOS and DNS.
 
Last edited:

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Given the latest info, I'm totally out of my depth, I'm sorry to say. It seems complicated using AD if the clients are authenticated with a different server.
 
Joined
Oct 10, 2014
Messages
6
Thank you for your time rogerh, you've given me a couple of ideas at least. I'll continue to search for a solution.

Adding dhcp option 119 adds my domain to the domain search list but that doesn't seem to solve the problem. I'm thinking that maybe I need a WINS-proxy or server. The weird thing is that problem seems to be more with the relation of my client and domain controller than the relation of my client and nas.
 
Joined
Oct 10, 2014
Messages
6
I'm cautiously optimistic that I might have solved the issue. I used net use /delete to remove all connectons to my nas. I then tried to connect using net use \\nas /user:T-NET\lintor and after password verificaton it seems I can now connect.

I'm not sure exactly why it works...
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Well done! Seems to be a mix of domain authentication and password authentication, quite complicated.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I always use net use /delete * when having problems. It's the only way to completely rule out authentication problems on Windows.

The problem is that Windows will only let you connect to a given machine with a single login. So if your first login was as a guest user (which may auto-authenticate thanks to Windows) you'll be boned until reboot. Of course, if it is automatically authenticating, once you reboot (or relog) you'll end up there all over again.

So I always use net use /delete and net use <blah bla blah> to mount my shares. It's the only way to be 100% sure that the account and credentials you are desiring to use are actually being used. I cover this in my permissions guide that is in the works. :P

For those that aren't domain admins, common login scripts use net use to mount your shares on bootup.
 
Joined
Oct 10, 2014
Messages
6
I've also discovered that changing the Windows ACLs with the Computer Management tool is very prone to lock outs and such. It seems it somehow affects the underlying folder permissions. Then the dataset is ruined since I'm not allowed to change permissions.

N4cwPT4.png


4rgYkaw.png
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I think compmgmt.msc modifies the per-share access controls. Samba stores the per-share access control settings in a file called share_info.tdb. You can use tdbtool to verify whether entries have been written to it. If you have accidentally written to the tdb file, you might be able to fix the problem by deleting the CIFS share in the FreeNAS GUI (not the underlying dataset) and recreating it. But it might also be good to see what you've done with the underlying permissions of the share. Post the output of "getfacl /mnt/[pool]/[dataset]" for the share that's causing problems.

The best way to configure permissions is through the "security" tab in explorer.
 
Last edited:
Status
Not open for further replies.
Top