Problems connecting to Freenas

Status
Not open for further replies.

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
Hi all,

I am a complete noob regarding FreeNAS. I am having problem setting up some things but the biggest problem is connecting my PCs (My own and my HomeTheater PC) to Freenas. I am not sure what I am doing wrong. I've tried to read many guides and watch many YouTube videos on it but I don't know what I am doing wrong.

Anyways, when I try to login from my personal computer I can log in but I get this message on Freenas:

an 20 22:18:59 freenas dhclient: New IP Address (em0): 192.168.1.4
Jan 20 22:18:59 freenas dhclient: New Subnet Mask (em0): 255.255.255.0
Jan 20 22:18:59 freenas dhclient: New Broadcast Address (em0): 192.168.1.255
Jan 20 22:18:59 freenas dhclient: New Routers (em0): 192.168.1.1
Jan 20 22:20:39 freenas smbd[6443]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsmatchname: host name/name mismatch: 192.168.1.3 != (NULL)
Jan 20 22:20:39 freenas smbd[6443]: [2015/01/20 22:20:39.075348, 0] ../source3/lib/util_sock.c:1199(get_remote_hostname)
Jan 20 22:20:39 freenas smbd[6443]: matchname failed on 192.168.1.3
Jan 20 22:21:53 freenas smbd[6542]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsmatchname: host name/name mismatch: 192.168.1.3 != (NULL)
Jan 20 22:21:53 freenas smbd[6542]: [2015/01/20 22:21:53.911804, 0] ../source3/lib/util_sock.c:1199(get_remote_hostname)
Jan 20 22:21:53 freenas smbd[6542]: matchname failed on 192.168.1.3
Jan 20 22:23:05 freenas smbd[6695]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsmatchname: host name/name mismatch: 192.168.1.3 != (NULL)
Jan 20 22:23:05 freenas smbd[6695]: [2015/01/20 22:23:05.423332, 0] ../source3/lib/util_sock.c:1199(get_remote_hostname)
Jan 20 22:23:05 freenas smbd[6695]: matchname failed on 192.168.1.3
Jan 20 22:23:22 freenas smbd[6710]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsmatchname: host name/name mismatch: 192.168.1.2 != (NULL)

What does it mean by "name mismatch"?

Here are my system and network settings:
Network/Global Config
Hostname: freenas
Domain: local
IPv4 Default Gateway: 192.168.1.1
Nameserver 1: 192.168.1.1
Everything else is blank and unchecked

Network/Interfaces
e
m0, Intel, DHCP checked, and Auto configure IPv6 checked

CIFS Settings
NetBIOS name: freenas
Workgroup: WORKGROUP
Description: FreeNAS Server
Local Master checked
Allow Empty Passwords
Time Server for Domain checked
Hostname lookups checked (tried unchecking it but didn't help)
All the other setting were left at default

General
Protocol: HTTP
Certificate: blank
WebGUI IPv4 Address: 0.0.0.0
WebGUI IPv6 Address: blank
WebGUI HTTP Port: 80
WebGUI HTTPS Port: 443
HTTP>HTTPS: checked

I have created my a user for myself named: Luis
I put myself under group: Luis (also HomeTheater group, and Family group which includes all my family, I made each a user account)
I checked Permit Sudo

Windows is the Dataset I am trying to share. I put Owner: Luis and Owner Group: Family. Apply mode is checked. Permission type is Windows.

This is the info of my PC
Computer Name: Luis
Full Computer Name: Luis
Computer Description: Luis
Workgroup: WORKGROUP

I login to my Windows 8.1 Update through Microsoft Account.
----------------------------------------------------------------------------------------

Although I am able to go into my folders on my personal PC. I am unable to go into my folders on my Hometheater PC. I get denied unless I make the share Allow Guest. If I leave the passwords blank, do they only work if I Allow Guest?

I made a user name called HomeTheaterPC and put it under the primary group called HomeTheater which includes myself and HomeTheaterPC.

The HomeTheaterPC has Disable password login checked so it doesn't need a password to go into my media folder that I am sharing.

So when I try to log into my media folder I am sharing. I get denied.

Jan 20 22:49:42 freenas smbd[13924]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsmatchname: host name/name mismatch: 192.168.1.2 != (NULL)
Jan 20 22:49:42 freenas smbd[13924]: [2015/01/20 22:49:42.601329, 0] ../source3/lib/util_sock.c:1199(get_remote_hostname)
Jan 20 22:49:42 freenas smbd[13924]: matchname failed on 192.168.1.2

That is what I get on Freenas and in Windows it says: You do not have permission to access....

Media folder is set up differently than Windows shared folder. Owner is Luis and Group is HomeTheater. I have the Mode all checked (Owner, Group, Other). Permission type: Unix (I want to share it between Mac and Windows).

My Hometheater PC runs Windows 8.1 and I login with my Microsoft Account. Same as my personal PC to keep everything synced up.

------------------------------------------------------------------------------------------

Sorry for the long post. I was trying to be detailed to that you guys can help me. If I am missing any information please let me know. Thank you all for your help.
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
I also get "The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mapping to this network share." This is for the Media folder I made. I want this folder to be shared on my Mac and PCs. This folder is going to be holding my movies and music and streamed on my Mac and PC running Widows Media Center. If I can't mount it, I cannot use it at all.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
The errors regarding hostname lookups just means you don't have DNS configured for your LAN. Totally benign. Just uncheck the box in your CIFS config.

Windows only let's you use one set of credentials per server. Remove network drives and cached credentials then choose one username and password combo for your computer. You can use the following command in cmd.exe to clear out network drives 'net use * /delete'. Credentials can be deleted using credential manager. Reboot once done.

Permissions type should be set to 'windows'. For minimal config do as follows:
  • Create your user on freenas
  • Create a group
  • Through GUI, change owner of volumes to the above user and group.
  • Go to your share config, make sure 'apply default permissions' is checked.
  • Connect to shares using credentials set above.
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
I'll give it a try. Thank you. I'll uncheck Hostname lookups and do the things you said. I'll report back if successful. Once I tackle this then I can move on to other things but this is the most critical issue. Thanks again for the help.
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
Okay,

So I followed what you told me. I unchecked Hostname lookups on the CIFS settings. I also created a user name: Luis and a group name: Family. Through the GUI I changed the owner of the volumes to Luis and Family group. Apply default permission has been checked already.

I updated to the newest freenas update and it added Microsoft account option which I run on my systems since I use that to log in. I check that option.

Now I am able to go into my folders that I am sharing on CIFS. It didn't even ask me a user name or password, and I don't get that error 'name mismatch'. But I cannot write at all. I try to copy a movie into the folder but it won't let me because I have no permission.

Jan 22 02:20:20 freenas nmbd[2496]: WORKGROUP(1) current master browser = FREENAS
Jan 22 02:20:20 freenas nmbd[2496]: FREENAS 40849a23 (FreeNAS Server)
Jan 22 02:20:20 freenas nmbd[2496]: HOMETHEATERPC 40011003 (HomeTheaterPC)
Jan 22 02:20:20 freenas nmbd[2496]: LUIS 40011003 (Luis)
Jan 22 02:20:20 freenas notifier: Reloading smbd.
Jan 22 02:20:20 freenas notifier: Reloading winbindd.
Jan 22 02:25:07 freenas smbd[11945]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsluis (ipv4:192.168.1.3:53198) closed connection to service Backups

That is what I get on my freenas. What do I have to do for freenas to know that its me logging in on my computer and have full permission? At the same time, I want to make sure people I don't want to write don't.

Thank you again for your help. Making progress =)
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
Jan 22 03:48:18 freenas smbd[4854]: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsFailed to fetch record!

I keep getting this. So annoying.
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
Code:
[global]
  username map = /usr/local/etc/smbusers
  server max protocol = SMB3
  encrypt passwords = yes
  dns proxy = no
  strict locking = no
  oplocks = yes
  deadtime = 15
  max log size = 51200
  max open files = 225794
  load printers = no
  printing = bsd
  printcap name = /dev/null
  disable spoolss = yes
  getwd cache = yes
  guest account = nobody
  map to guest = Bad User
  obey pam restrictions = yes
  directory name cache size = 0
  kernel change notify = no
  panic action = /usr/local/libexec/samba/samba-backtrace
  server string = FreeNAS Server
  ea support = yes
  store dos attributes = yes
  time server = yes
  acl allow execute always = true
  acl check permissions = true
  dos filemode = yes
  domain logons = no
  local master = yes
  idmap config *: backend = tdb
  idmap config *: range = 90000001-100000000
  server role = standalone
  netbios name = FREENAS
  workgroup = WORKGROUP
  security = user
  pid directory = /var/run/samba
  smb passwd file = /var/etc/private/smbpasswd
  private dir = /var/etc/private
  create mask = 0666
  directory mask = 0777
  client ntlmv2 auth = yes
  dos charset = CP437
  unix charset = UTF-8
  log level = 1
  

[Backups]
  path = /mnt/HomeServer/Storage/Backups
  printable = no
  veto files = /.snapshot/.windows/.mac/.zfs/
  writeable = no
  browseable = yes
  recycle:repository = .recycle/%U
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:directory_mode = 0777
  recycle:subdir_mode = 0700
  shadow:snapdir = .zfs/snapshot
  shadow:sort = desc
  shadow:localtime = yes
  shadow:format = auto-%Y%m%d.%H%M-2w
  vfs objects = recycle shadow_copy2 zfsacl
  hide dot files = yes
  guest ok = no
  nfs4:mode = special
  nfs4:acedup = merge
  nfs4:chown = true
  zfsacl:acesort = dontcare
  

[Media]
  path = /mnt/HomeServer/Media
  printable = no
  veto files = /.snapshot/.windows/.mac/.zfs/
  writeable = no
  browseable = yes
  recycle:repository = .recycle/%U
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:directory_mode = 0777
  recycle:subdir_mode = 0700
  vfs objects = recycle zfsacl
  hide dot files = yes
  guest ok = no
  nfs4:mode = special
  nfs4:acedup = merge
  nfs4:chown = true
  zfsacl:acesort = dontcare
  

[Storage]
  path = /mnt/HomeServer/Storage
  printable = no
  veto files = /.snapshot/.windows/.mac/.zfs/
  writeable = no
  browseable = yes
  recycle:repository = .recycle/%U
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:directory_mode = 0777
  recycle:subdir_mode = 0700
  shadow:snapdir = .zfs/snapshot
  shadow:sort = desc
  shadow:localtime = yes
  shadow:format = auto-%Y%m%d.%H%M-2w
  vfs objects = recycle shadow_copy2 zfsacl
  hide dot files = yes
  guest ok = no
  nfs4:mode = special
  nfs4:acedup = merge
  nfs4:chown = true
  zfsacl:acesort = dontcare
  

[Windows]
  path = /mnt/HomeServer/Windows
  printable = no
  veto files = /.snapshot/.windows/.mac/.zfs/
  writeable = no
  browseable = yes
  recycle:repository = .recycle/%U
  recycle:keeptree = yes
  recycle:versions = yes
  recycle:touch = yes
  recycle:directory_mode = 0777
  recycle:subdir_mode = 0700
  shadow:snapdir = .zfs/snapshot
  shadow:sort = desc
  shadow:localtime = yes
  shadow:format = auto-%Y%m%d.%H%M-2w
  vfs objects = recycle shadow_copy2 zfsacl aio_pthread streams_xattr
  hide dot files = yes
  guest ok = no
  nfs4:mode = special
  nfs4:acedup = merge
  nfs4:chown = true
  zfsacl:acesort = dontcare
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
You have "server max protocol" set to SMB3. Change this to SMB2 as SMB3 is not entirely stable.

You have /mnt/HomeServer/Storage and /mnt/HomeServer/Storage/Backups set as shares. Remove the "Backups" share as it is located within another share. This can cause erratic behavior in Samba.

Post output of following:
  • getfacl /mnt/HomeServer/Storage
  • getfacl /mnt/HomeServer/Media
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
Okay. I switched it back to SMB2. I also changed the Backups folder and TimeMachine folder. Both were located within another shared folder. So I put them in their own folder under HomeServer and shared it that way.

I'll post the output of those things you asked once I get home. I'll also test out how these changes turn out. Thanks!
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
Post output of following:
  • getfacl /mnt/HomeServer/Storage
  • getfacl /mnt/HomeServer/Media
------------------------------------------------

Those folders are empty. What do I need to output again? Or how do you get there?

I cannot write to my NAS from my computers.
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
So I am trying to have permission to write on ANY folder that I am sharing from FreeNAS but I cannot get it to work. Attached is a picture of my security settings in Windows 8.1. One is showing a folder of a FreeNAS security settings and the other is showing a folder within my PC. I also attached picture of all my settings in CIFS and Permissions. Please let me know what I need to change to get my CIFS to give permission for my PCs that I want to be able to write.

Thank you.

Security Settings.png
CIFS settings.png
Edit option settings.png
Media permission settings.png
Media.png
 

Luigi408

Dabbler
Joined
Jan 20, 2015
Messages
36
OMG it worked! Finally! Thank you very much! I appreciate everyone's help with this sharing stuff.

Where is the correct place to post questions about SSL certificates?

Thanks everyone again :D
 
Status
Not open for further replies.
Top