CIFS - Home Directories

Status
Not open for further replies.

TGRHavoc

Cadet
Joined
Aug 31, 2015
Messages
8
Hello,

I don't know if this is a known issue with FreeNAS or, if I'm messing something up so, I've took to posting the problem I'm having on the forums in the hope that someone much more experienced than myself would be able to help.

The problem:

Users with capitalization in their name (e.g. Test) cannot access their "Home" file share.

So, I set up two accounts on the NAS box (on for myself, and a test account) and named them with capital letters at the beginning, I then set up some shares created groups etc. Then I tried to access the home shares with my user but, I was getting the following error:

Code:
Sep  1 03:42:47 sharksevrer smbd[72813]: [2015/09/01 03:42:47.296708,  0] ../source3/smbd/service.c:792(make_connection_snum)
Sep  1 03:42:47 sharksevrer smbd[72813]:   canonicalize_connect_path failed for service Jordan, path /mnt/sharkserver/User Homes/jordan


So, SMB is looking in the wrong location for my user... But, why?

It already knows that the username has a capital letter (shows this in the output) so, why is it looking for a home share with a lowercase letter?

I've managed to work around this by FTP-ing in as root and renaming the folder with a lowercase letter but, I don't want to do that every time I create a new user.

Any help is appreciated, thanks in advance.
 

TGRHavoc

Cadet
Joined
Aug 31, 2015
Messages
8
post contents of /etc/local/smb4.conf and enclose in [ code ] tags.
Code:
[global]
    username map = /usr/local/etc/smbusers
    server min protocol = NT1
    server max protocol = SMB2
    encrypt passwords = yes
    dns proxy = no
    strict locking = no
    oplocks = yes
    deadtime = 15
    max log size = 51200
    max open files = 87599
    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
    dfree command = /usr/local/libexec/samba/dfree
    panic action = /usr/local/libexec/samba/samba-backtrace
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    server string = NAS Server
    ea support = yes
    store dos attributes = yes
    lm announce = yes
    hostname lookups = yes
    time server = yes
    null passwords = yes
    acl allow execute always = true
    acl check permissions = true
    dos filemode = yes
    multicast dns register = 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
  

[Development]
    path = /mnt/freenas/Development
    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
    shadow:snapdir = .zfs/snapshot
    shadow:sort = desc
    shadow:localtime = yes
    shadow:format = auto-%Y%m%d.%H%M-2m
    shadow:snapdirseverywhere = yes
    vfs objects = shadow_copy2 zfsacl aio_pthread streams_xattr
    hide dot files = no
    guest ok = no
    nfs4:mode = special
    nfs4:acedup = merge
    nfs4:chown = true
    zfsacl:acesort = dontcare
  

[Public]
    path = /mnt/freenas/public
    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 = yes
    nfs4:mode = special
    nfs4:acedup = merge
    nfs4:chown = true
    zfsacl:acesort = dontcare
  

[homes]
    valid users = %U
    path = /mnt/freenas/User 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
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
This has existed since I started using freenas on 9.1.1. I thought there was a bug open for it but since it hasn't been fixed there probably isn't.
 
D

dlavigne

Guest
If you do create a bug report at bugs.freenas.org, post the issue number here.
 

TGRHavoc

Cadet
Joined
Aug 31, 2015
Messages
8
This has existed since I started using freenas on 9.1.1. I thought there was a bug open for it but since it hasn't been fixed there probably isn't.
Darn, do you know of any better work around other than renaming the folders?

Edit: Submitted a bug report, you can find it here: #11271
 
Last edited:

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I think it has to do with Windows being case insensitive and how the auth subsystem works. Somewhere along the way the auth token that gets used is returning an all lower case username which leads to the path being messed up.

You can either change client username or change path name.
 
Status
Not open for further replies.
Top