[Samba] run script on domain join

Andrew Bartlett abartlet at samba.org
Wed May 23 08:07:27 UTC 2018

On Wed, 2018-05-23 at 09:36 +0200, Arnaud FLORENT via samba wrote:
> the host has first an address in dhcp pool between (it 
> is not known by dhcpd with a fixed ip address)
> i would like to add a dhcpd record to provide always same ip to host (ie 
> fixed-address
> when host is joined to my samba domain
> in NT PDC, i can do that with  "add machine script" in smb.conf
> but in AD DC, this script is not run
> so i m searching another way to run a script when a computer join the AD 
> DC domain

I agree, this kind of thing would be useful.  There are some
alternative solutions for some of this, but I do want to say:

I know how much these scripts have added value to the NT4/Classic
domain configuration, and sadly Samba's AD DC effort have not provided
those hooks so far. 

For example, we only gained back the 'check password script'
comparatively recently, and other well-used hooks have been
implemented, but in a different way (for example password sync via an
external tool). 

The new password sync tool is actually a good example, because I
strongly feel that for Samba to continue to thrive that we need to
remember we can and should step beyond 'what Microsoft did' in terms of
a feature set, and remember that what folks love most about Samba is
being able to do more and different things (like running those
scripts), and better fitting in to a unix-centric world in which it is
so often deployed.  

(We can now sync passwords into the crypt() format used by OpenLDAP and
Google, as well as any other format if you are willing to GPG encrypt
the password). 

Of course finding the time (customers) to implement these ideas is
always a challenge, but we have some good examples already and it
remains a guiding principal for me.


Andrew Bartlett

Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba mailing list