[Samba] Creating home folders on file server automatically
Denis Cardon
dcardon at tranquil.it
Mon Jun 12 21:06:45 UTC 2017
Hi Luke,
>
> We have a script we are using to create new users, and drop them into the
> proper OUs on our Samba AD server, using samba-tool. We have a Samba member
> file server (fs1) joined to the domain for hosting our file shares. On
> there is also where we are putting the users' home folders.
>
> I saw in the Samba Docs, and in the mailing list, that I can use
> `--home-directory=\\server\directory\$username`. I have that added,
> pointing to the file server's location. The issue is, the folder does not
> get created, even when the user logs in.
>
> The only way it seems to create the folder is if I go into ADUC on my Admin
> computer, go into the user's properties, and change the text for the Home
> Folder to something, then change it back, and hit OK. The correct text
> shows up initially, but it is not getting created on the member server
> automatically.
>
> Is there a known way to get past this limitation? We add thousands of users
> each year (school setting).
You can use the "root preexec" parameters to call a script that will
create your user home dir and set the proper acls when they connect to
the homes share:
[homes]
path = /home/homes/%U
read only = no
root preexec = /opt/mkprofile.sh %U
Cheers,
Denis
>
--
Denis Cardon
Tranquil IT Systems
Les Espaces Jules Verne, bâtiment A
12 avenue Jules Verne
44230 Saint SĂ©bastien sur Loire
tel : +33 (0) 2.40.97.57.55
http://www.tranquil-it-systems.fr
More information about the samba
mailing list