Not sure if I'm setting up home directories correctly

Status
Not open for further replies.

ideal2545

Dabbler
Joined
Jun 1, 2015
Messages
25
Hi,

I'm trying to setup home directories such that when a user authenticates to FreeNas and uses CIFS, their home folder pops up. I believe this is a normal thing. So if "Jon" logs in, under //freenas/, //freenas/Jon will appear, but if Nick logs in under //freenas/, //freenas/Nick will appear instead.

So I can get the folders to appear this way, but I can't get into them. Here's how I set this up. I setup a dataset called "Homes" (Permission Type: Windows, Owner: Root, Owner: Wheel) and shared that via CIFS and selected the option "Home Directory".

I then created a new user and told it to create the homedirectory under //pool1/Homes/

//pool1/Homes/Jon now exists and its owner:group is Jon:Jon and appears to be 770

This is where I pretty much am at this point. The users folders shows up but is unreachable over CIFS

Any help would be appreciated!

Jon
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
make sure users have read and execute permissions on the homes dataset. Since you are using windows permission i don't know what that is but if it was posix it would be 755 on the Homes dataset. This will allow users to read the share and traverse into their desired folder. I know the smb "home directory" feature might do something else under the covers but i would try this first to see if it changes anything.
 

ideal2545

Dabbler
Joined
Jun 1, 2015
Messages
25
Tried, no luck! I confirmed that the user Jon can traverse through the Homes directory and get into the home directory. I'm thinking its probably SMB related, I'll keep chugging along till I get it
 

ideal2545

Dabbler
Joined
Jun 1, 2015
Messages
25
Well still no luck. I have confirmed that the Homes dataset can be traversed by the users and that each individuals Home folder has the proper permissions, currently set to 700.

Here is the samba config for the [homes] portion of the smb4.conf file. I'm thinking it might have something to do with valid users??

[homes]
valid users = %U
path = /mnt/DBJPool01/Homes/%U
comment = Home Directories
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
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 = 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
[homes] are finicky at the best of times.

I prefer create a share [Users] with directories inside it for each user.
/mnt/Users has the ACE "everyone" allow read-only "this folder only"
/mnt/Users/[username] is modified so that the user is owner of folder, and permissions for "everyone" is removed.

Remove "valid users". Post getfacl output for:
  • /mnt/DBJPool01/Homes
  • /mnt/DBJPool01/Homes/[username]

Post your smb4.conf file as well.
Note that [homes] is a special type of samba share that exports your users' home directories.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
When using homes make sure your username has the same case as your home directory and user in freenas. I make everything lower case so I don't have to deal with window to POSIX case sensitivity issues.
 
Status
Not open for further replies.
Top