[Samba] Samba AD domain member and home directory creation

Dario Lesca d.lesca at solinos.it
Thu Feb 9 15:10:18 UTC 2017


On a Centos 7 minimal fresh install I have follow this howto:

http://www.hexblot.com/blog/centos-7-active-directory-and-samba

and I have Joining to an Active Directory server without problem.

The command "id administrator" work great, the home directory (/home/us
er at srl) is successfully created if I run "su - user" or "ssh
user at localhost" from a shell command.

Ad this point I have add the [homes] session to smb.conf 

    [homes]
        comment = Home Directories
        browseable = No
        inherit acls = Yes
        read only = No
        valid users = %S %D%w%S

an also this work fine, but only if I run before "su - user" or I
create manually the user's home directory.

My question is:

    There is some way to create automatically this home directory when
    the user access to it the first time via smbclient or another WinPC?

Many thanks. 
 
P.S. This is my testparm -s:

> Server role: ROLE_DOMAIN_MEMBER
> 
> # Global parameters
> [global]
>         realm = SRL.LOCAL
>         workgroup = SRL
>         log file = /var/log/samba/log.%m
>         max log size = 50
>         load printers = No
>         printcap name = /dev/null
>         security = ADS
>         idmap config * : backend = tdb
>         cups options = raw
>         hosts allow = 127. 192.168.1.
> 
> 
> [homes]
>         comment = Home Directories
>         browseable = No
>         inherit acls = Yes
>         read only = No
>         valid users = %S %D%w%S
> 
> 
> [dati]
>         comment = Area pubblica
>         path = /u/samba/dati
>         read only = No
> 
-- 
Dario Lesca
(inviato dal mio Linux Fedora 25 Workstation)



More information about the samba mailing list