[Samba] Execute a user script whenever a user is added in the domain

Rowland Penny rpenny at samba.org
Thu Nov 23 20:09:36 UTC 2017


On Thu, 23 Nov 2017 20:31:46 +0100
Fabian Fritz via samba <samba at lists.samba.org> wrote:

> Hi,
> 
> I am using the ADUC-tool on Windows PCs to add users to the domain.
> Now I also need to do some maintance work on the linux server (DC).
> Is there an option that I've overlooked or any other way to execute a
> shell script whenever a user is added? Ideally it would be executed
> on each DC.
> 
> If there isn't a built-in way, would it be possible by monitoring one
> of the ldb-files for changes?
> 
> I know of the "add user script" property, but I'm not sure this is
> still supported in version 4 and from the description it seems like
> it is only executed once a user logs in.
> 
> Thanks,
> Fabian

The 'add user script' is run when a user authenticates and smbd cannot
find a Unix user, but on a Unix domain member (or DC) the user is also
a Unix user or isn't, if it isn't, then the user wont get authenticated
by AD so the 'add user script' wont get run.

It might help if you could explain just what you need to do on the DC
when the user is created.

Rowland

 



More information about the samba mailing list