Home directory via CIFS - one unnecessary level?

Status
Not open for further replies.

emk2203

Guru
Joined
Nov 11, 2012
Messages
573
I made a layout with a home directory which contains my home folder directly below:
/mnt/tank/home/emk2203 on the root filesystem. However, after enabling home directories in CIFS, they show up on a network client as \\N40LNAS\emk2203\emk2203\. If I browse to the homes directory, everything is as it should be: \\N40LNAS\homes\emk2203\.

Any idea how to get the home to be \\N40LNAS\emk2203\ ?
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
I'd like to know this too!
 

Razorblade

Dabbler
Joined
Apr 12, 2012
Messages
35
That's exactly what I've been looking for.
Could anyone please explain this behaviour and maybe show a way to resolve this.
 

hungarianhc

Patron
Joined
Mar 11, 2014
Messages
234
It's totally possible. You can disable the home directory... It's all about permissions!
 

emk2203

Guru
Joined
Nov 11, 2012
Messages
573
It's totally possible. You can disable the home directory... It's all about permissions!

It's not about disabling, maybe I was not clear. The current behaviour is not logical. You expect your own stuff in your smbhome directory and the stuff from others (homes) in a directory with several subdirectories for user1, user2 and so forth.

At the moment, I see my own content in my home dir, but the homes dir seems to be the same. So the 'one level too deep' issue was fixed for the price of homes not working anymore.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Your path under cifs settings for home directory root path is probably wrong.
 

emk2203

Guru
Joined
Nov 11, 2012
Messages
573
Your path under cifs settings for home directory root path is probably wrong.

The options in the CIFS settings are:

Enable home directories [checked]
Enable home directories browsing [checked]
Home directories path: /mnt/tank/home

I am at a loss here; there's not much to change to. FYI, I tried setting the path to /mnt/tank, which didn't work at all (as expected).
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
I think it may be related to SFTP setups - For ease of use.. I finally figured out how to lock down SFTP and users to home dirs.. Make sure you follow the instructions carefully for attempting to do that..

I see the folder or extra level however user is indeed restricted as root/wheel owned dataset..

To be honest I am not sure if this extra path can be removed currently.. Maybe in 9.2.2..
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
What os is this client? What smb client are you using?
 

emk2203

Guru
Joined
Nov 11, 2012
Messages
573
What os is this client? What smb client are you using?
Windows 8.1 and plain old explorer, nothing fancy. This would be a default configuration - current Windows.version with Windows explorer.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
basically if you have settings like this it should work.

1. Disable smb3 and only use smb2.
2. all usernames and home directories are lower case
3. cifs home directory path is /mnt/tank/homes
4. enable home directories "checked"
5. browsing home directories "checked"
6. create a directory in /mnt/tank/homes/<username-directory> that matches the name of your user on freenas.
example: i have "drwxr-xr-x bob users /mnt/tubby/homes/bob", i also have a user named bob. notice how the directory is owned by the user it is for

now if you go to finder in windows 8.1 you should be able to find your freenas box and it should have a share named homes. if you double click on this it will take the username that is the current active user on the windows box and try to connect to the cifs share called homes which is then going to direct you to the folder that matches that username. If this doesn't work you are doing something wrong.
 
Status
Not open for further replies.
Top