[Samba] Creating home folders on file server automatically

Rowland Penny rpenny at samba.org
Mon Jun 12 17:32:56 UTC 2017


On Mon, 12 Jun 2017 10:04:56 -0700
Luke Barone via samba <samba at lists.samba.org> wrote:

> Hi list,
> 
> 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 are only doing half the job ;-)

Add:

session    required   pam_mkhomedir.so skel=/etc/skel/ umask=0022

to /etc/pam.d/common-session on the Unix domain member

NOTE: this on Debian, I believe there is something similar on red-hat

Rowland



More information about the samba mailing list