[Samba] Not sure I understand when add user script is called

TAKAHASHI Motonobu monyo at monyo.com
Sat Feb 19 19:10:10 MST 2011

2011/2/18 Jack Downes <jax at nwmt.us>:
> I've built a domain member.  It works pretty good with the exception that I
> want on-the-fly home directories being built.  I'm not sure this is doable
> with a domain member as everything I've tried isn't even called - as far as
> I can tell.  Using log level 3.
> If anyone can shed light on how to dynamically create home directories,
> that'd be great.
> anyway, here's my latest incarnation of smb.conf.

If you enable winbind, "add user script" is not called.

2011/2/19 Andrew Masterson <Andrew.Masterson at nuvistaenergy.com>:
> Here's how we do it.  There are a thousand variations on a theme (samba
> 3.5.6)
> [homes]
>        path = /data/homes/%D/%S
>        valid users = "@XXXXXX+domain admins", %S
>        read only = No
>        root preexec = /data/Backup/createhomes.sh %D %S
> Shell script looks like (creates /data/homes/<DOMAIN NAME>/<USERNAME>)

2011/2/19 Andrew Masterson <Andrew.Masterson at nuvistaenergy.com>:
> session         required       /usr/local/lib/pam_mkhomedir.so

If you use pam_mkhomedir.so, you have to set

  obey pam restrictions = yes

in [global] section.

TAKAHASHI Motonobu <monyo at samba.gr.jp>

More information about the samba mailing list