CIFS bug with home dir case sensitivity after adding a user

Status
Not open for further replies.

liket

Cadet
Joined
Sep 17, 2016
Messages
1
Hi, I'm brand new at all this with FreeNAS but I think I've found a bug, I'll explain.

Firstly, I create a dataset called "home" with Share type: "Windows", Case Sensitive: "On", Enable atime: "Off" under my only volume called "Stripe-test" (Why it's called Volume instead of Pool was confusing me for a time, being new to ZFS too besides a light reading into to it.)

Second, I create my user with an upper case first letter called "Rickard", choose Create Home Directory under "/mnt/Stripe-test/home" and leave everything at default

Lastly I share my home folder under Windows (CIFS) with the path "/mnt/Stripe-test/home" and select "Use as home share", the only other thing i select is to add "full audit" under VFS Objects, because I think that's what makes samba syslog with full verbosity on that folder (?)

Now, I've added "Show console messages in the footer", so when I look at the log when trying to access my folder, I get the message:
"Oct 8 13:27:18 freenas smbd_audit: Rickard|192.168.1.57|realpath|fail (No such file or directory)|/mnt/Stripe-test/home/rickard"

This tells me it's trying to mount my folder with the first letter being lower case, despite me adding my account user as an upper case letter, and when I SSH in, looking at the file system, the folder has been created with an upper case letter.

Just tell me if I'm doing something wrong here or is this a bug?

Also, I'm seeing both "home" and a "Rickard" share when browsing my FreeNAS-server, even though I haven't shared my "Rickard" directory. From where in the config has this "Rickard"-folder automagically been shared? Is it just the default samba-config?
Notice also that the dedicated "Rickard"-share name has an upper case letter, but when trying to access it, It still trying to get me into a a lower case one.

edit: Forgot to say that it works if I rename the folder to lower case.
 
Last edited:

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
Why it's called Volume instead of Pool was confusing me for a time, being new to ZFS too besides a light reading into to it.
Yeah, that is a bit confusing but I treat them as the same thing. Usually I call it Pool/Volume in my replies...
Share type: "Windows", Case Sensitive: "On"
Set that to "Off"
Notice also that the dedicated "Rickard"-share name has an upper case letter, but when trying to access it, It still trying to get me into a a lower case one.
Are you logging onto your computer with "rickard" or "Rickard"?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Set that to "Off"
Are you logging onto your computer with "rickard" or "Rickard"?
Samba should be able to handle any case sensitivity issues, I think that's a red herring.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hi, I'm brand new at all this with FreeNAS but I think I've found a bug, I'll explain.

Firstly, I create a dataset called "home" with Share type: "Windows", Case Sensitive: "On", Enable atime: "Off" under my only volume called "Stripe-test" (Why it's called Volume instead of Pool was confusing me for a time, being new to ZFS too besides a light reading into to it.)

Second, I create my user with an upper case first letter called "Rickard", choose Create Home Directory under "/mnt/Stripe-test/home" and leave everything at default

Lastly I share my home folder under Windows (CIFS) with the path "/mnt/Stripe-test/home" and select "Use as home share", the only other thing i select is to add "full audit" under VFS Objects, because I think that's what makes samba syslog with full verbosity on that folder (?)
You can just increase logging verbosity with 'log level' or whatever it's called. There's no need to use vfs_full_audit for this purpose.

Also, I'm seeing both "home" and a "Rickard" share when browsing my FreeNAS-server, even though I haven't shared my "Rickard" directory. From where in the config has this "Rickard"-folder automagically been shared? Is it just the default samba-config?
yup. If you want to get rid of one of them, unchecked 'browseable' for the home share.

Notice also that the dedicated "Rickard"-share name has an upper case letter, but when trying to access it, It still trying to get me into a a lower case one.

edit: Forgot to say that it works if I rename the folder to lower case.
I believe this is normal behavior for home shares.

FYI, I believe the convention in Unix is to make usernames all lowercase. In fact, many Linux distros actually force usernames to be lowercase.
 
Last edited:

HateTheDrake

Dabbler
Joined
Jun 23, 2017
Messages
13
Apologies for bringing this one up from the dead, but I also ran into this issue. However, it was with AD integration. Someone created the user in CamelCase format and the homes share would not allow them access until I renamed it to all lowercase. (despite their AD name retaining CamelCase) The zfs dataset was already marked as insensitive.

Thoughts on a fix or just stick to the renaming workaround? (and go flog the identity mgmt staff who create logins...)
 
Status
Not open for further replies.
Top