[Samba] steps to get automatic home folder created at user logon windows 10 with samba 4.9.5-Debian

Jelle de Jong jelledejong at powercraft.nl
Wed Apr 29 21:07:57 UTC 2020


Hello everybody,

I been at this for more then a week and went through the archives and 
wiki but can not get it to work.

I been trying to follow these steps:
https://wiki.samba.org/index.php/User_Home_Folders

wanted behavior:

samba-tool user create jdoe pass01 --login-shell /bin/bash --given-name 
"John Doe" --home-drive=H --home-directory="\\\SAMBA01\users\jdoe 
--script-path=netlogon.bat

first logon on windows 10 pro domain member:
no \\SAMBA01\users\jdoe is created....

When I logon as SAMDOM/ADMINISTRATOR and create user with ADUC and fill 
in the profile the userdir is either added or it gives the error that 
the user dir already exist but in really it is not there, cashing issue?

How can I debug this all?

Kind regards,

Jelle de Jong

root at samba01:~# getfacl /srv/storage/users/
getfacl: Removing leading '/' from absolute path names
# file: srv/storage/users/
# owner: root
# group: domain\040users
# flags: -s-
user::rwx
user:root:rwx
user:10512:rwx
user:10513:r-x
group::r-x
group:NT\040Authority\\authenticated\040users:r-x
group:NT\040Authority\\system:rwx
group:domain\040admins:rwx
group:domain\040users:r-x
mask::rwx
other::---
default:user::rwx
default:user:root:rwx
default:user:10512:rwx
default:group::---
default:group:NT\040Authority\\system:rwx
default:group:domain\040admins:rwx
default:group:domain\040users:---
default:mask::rwx
default:other::---


root at samba01:~# cat /etc/samba/smb.conf
[global]
    workgroup = SAMDOM
    security = ADS
    realm = SAMDOM.POWERCRAFT.NL

    winbind refresh tickets = Yes
    vfs objects = acl_xattr
    map acl inherit = Yes

    dedicated keytab file = /etc/krb5.keytab
    kerberos method = secrets and keytab

    winbind use default domain = yes

    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes

    #username map = /usr/local/samba/etc/user.map

    log file = /var/log/samba/%m.log
    log level = 1

    idmap config * : backend = tdb
    idmap config * : range = 3000-7999

    idmap config SAMDOM:backend = rid
    #idmap config SAMDOM:schema_mode = rfc2307
    idmap config SAMDOM:range = 10000-999999
    #idmap config SAMDOM:unix_nss_info = yes

    template shell = /bin/bash
    template homedir = /home/%U

    idmap config SAMDOM:unix_primary_group = yes

    winbind enum users = yes
    winbind enum groups = yes

[documenten]
     path = /srv/storage/shares
     read only = No
     create mask = 0660
     directory mask = 0770
     inherit acls = Yes
     map acl inherit = Yes
     hide unreadable = Yes
     store dos attributes = Yes
     vfs objects = recycle
     recycle:touch_mtime = Yes
     recycle:versions = Yes
     recycle:keeptree = Yes

[openbaar]
     path = /srv/storage/guestshare
     store dos attributes = Yes
     writable = yes
     printable = no
     only guest = yes
     public = yes
     guest ok = yes
     guest only = yes
     guest account = nobody
     browsable = yes
     create mask = 0660
     directory mask = 0770
     inherit acls = Yes
     map acl inherit = Yes
     hide unreadable = Yes
     store dos attributes = Yes

[users]
     path = /srv/storage/users/
     read only = No

[profiles]
     path = /srv/storage/profiles/
     browseable = No
     read only = No
     force create mode = 0600
     force directory mode = 0700
     csc policy = disable
     store dos attributes = yes
     vfs objects = acl_xattr



More information about the samba mailing list