<samba:parameter name="add user script"
context="G"
- type="string"
+ type="string"
+ substitution="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>
static int _smb_create_user(const char *domain, const char *unix_username, const char *homedir)
{
TALLOC_CTX *ctx = talloc_tos();
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
char *add_script;
int ret;
- add_script = lp_add_user_script(ctx);
+ add_script = lp_add_user_script(ctx, lp_sub);
if (!add_script || !*add_script) {
return -1;
}
/* Create appropriate user */
if (acct_flags & ACB_NORMAL) {
- add_script = lp_add_user_script(mem_ctx);
+ add_script = lp_add_user_script(mem_ctx, lp_sub);
} else if ( (acct_flags & ACB_WSTRUST) ||
(acct_flags & ACB_SVRTRUST) ||
(acct_flags & ACB_DOMTRUST) ) {
fstring name2;
if ((acb_info & ACB_NORMAL) && name[strlen(name)-1] != '$') {
- add_script = lp_add_user_script(tmp_ctx);
+ add_script = lp_add_user_script(tmp_ctx, lp_sub);
} else {
add_script = lp_add_machine_script(tmp_ctx, lp_sub);
}