diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index bf0cbc0e9d9..5a0ef8824a1 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -2294,7 +2294,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx) lpcfg_do_global_parameter_var(lp_ctx, "samba kcc command", "%s/samba_kcc", dyn_SCRIPTSBINDIR); lpcfg_do_global_parameter(lp_ctx, "template shell", "/bin/false"); - lpcfg_do_global_parameter(lp_ctx, "template homedir", "/home/%WORKGROUP%/%ACCOUNTNAME%"); + lpcfg_do_global_parameter(lp_ctx, "template homedir", "/home/%D/%U"); lpcfg_do_global_parameter(lp_ctx, "client signing", "default"); lpcfg_do_global_parameter(lp_ctx, "server signing", "default"); diff --git a/source4/winbind/wb_cmd_getpwnam.c b/source4/winbind/wb_cmd_getpwnam.c index 0101d8ca23f..c4f3db8df68 100644 --- a/source4/winbind/wb_cmd_getpwnam.c +++ b/source4/winbind/wb_cmd_getpwnam.c @@ -133,9 +133,9 @@ static void cmd_getpwnam_recv_user_info(struct composite_context *ctx) WBSRV_SAMBA3_SET_STRING(pw->pw_gecos, user_info->out.full_name); WBSRV_SAMBA3_SET_STRING(pw->pw_dir, lpcfg_template_homedir(state->service->task->lp_ctx)); - all_string_sub(pw->pw_dir, "%WORKGROUP%", state->workgroup_name, + all_string_sub(pw->pw_dir, "%D", state->workgroup_name, sizeof(fstring) - 1); - all_string_sub(pw->pw_dir, "%ACCOUNTNAME%", user_info->out.account_name, + all_string_sub(pw->pw_dir, "%U", user_info->out.account_name, sizeof(fstring) - 1); WBSRV_SAMBA3_SET_STRING(pw->pw_shell, lpcfg_template_shell(state->service->task->lp_ctx)); diff --git a/source4/winbind/wb_cmd_getpwuid.c b/source4/winbind/wb_cmd_getpwuid.c index 73bbb59bc3d..997776760cf 100644 --- a/source4/winbind/wb_cmd_getpwuid.c +++ b/source4/winbind/wb_cmd_getpwuid.c @@ -153,9 +153,9 @@ static void cmd_getpwuid_recv_user_info(struct composite_context *ctx) WBSRV_SAMBA3_SET_STRING(pw->pw_gecos, user_info->out.full_name); WBSRV_SAMBA3_SET_STRING(pw->pw_dir, lpcfg_template_homedir(state->service->task->lp_ctx)); - all_string_sub(pw->pw_dir, "%WORKGROUP%", state->workgroup, + all_string_sub(pw->pw_dir, "%D", state->workgroup, sizeof(fstring) - 1); - all_string_sub(pw->pw_dir, "%ACCOUNTNAME%", user_info->out.account_name, + all_string_sub(pw->pw_dir, "%U", user_info->out.account_name, sizeof(fstring) - 1); WBSRV_SAMBA3_SET_STRING(pw->pw_shell, lpcfg_template_shell(state->service->task->lp_ctx));